ianharrigan / hxWebSockets

hxWebSockets - websockets for all haxe platforms
https://github.com/ianharrigan/hxWebSockets
81 stars 18 forks source link

Usability improvements #2

Closed Tezar closed 5 years ago

Tezar commented 5 years ago

Few tweaks needed for my use case but general enough to be beneficial for others

ianharrigan commented 5 years ago

Nice one... thanks for this!

ianharrigan commented 5 years ago

Ive just find some issues with this while trying to add java support... have you tried the neko server and client? It doesnt work anymore and its something (i think) to do with the new way of reading the initial http request

ianharrigan commented 5 years ago

Ive made some changes here: https://github.com/ianharrigan/hxWebSockets/commit/71d1bab5f1694c4cff8282a659eede38fb077f03 - what im unsure of is how it ever worked with you :)

Tezar commented 5 years ago

I tested only client portion on neko.

Made few "unit tests" for buffer and it worked as expected, but looking at your changes I haven't tried splitting with multiple chunks present and already few bytes consumed.

For the websocket URI default value, you can now remove this check. You doing it during parsing makes more sense. https://github.com/ianharrigan/hxWebSockets/blob/28eda5d4f3d2bd30802624a22d1204d2cc3f5ba3/hx/ws/WebSocket.hx#L174

Tried your changes and it didn't break anything for me

ianharrigan commented 5 years ago

Great... fantastic it didnt break anything! There is also java (nio) and c# support now :)