You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request for Native Websocket which is supported on HTTP socket #5467
Maybe that one can get a websock object from the HTTP?
Or maybe I'm msising something and the HTTP connection has a mode it goes into to support length-data transmissions bi-directionally?
That's all websock is once it negotiates is a UTF-8 -esqe encoding of lengths... most implementations didn't go over 16k fragments.
Basically; and supplying a reference that addressed all 3 versions... it's much less complex if you don't have to handle the HTTP stuff. (which that does too)
if I have an HTTP socket request on the server I'd like to define like on( "upgrade", (protocol)=>{ is protocol == ;'websocket' ) or something and then be able to or already have on( "message" )
On the other side that made the request, they can keep the HTTP object open and do a http.upgrade( 'websocket' ) and define the appropriate websock methods on that object? Or maybe return a separate websocket object from that.... which can then have message/close/error handlers.
I don't know if the methods get overwritten between HTTP and websock (MDN, Opera, IE, Chrome) all supported it, so I sort of expect it in a core library; it's not a horibble standard, it's masked but only by option, and if it were a semi-native implmeentation with HTTP it might have an easier time dealing with the bytecode length and fragments and other bits ...
Activity
mscdex commentedon Feb 28, 2016
I'm not sure I understand what exactly you're asking for. Are you asking for websockets in core or something else?
d3x0r commentedon Feb 28, 2016
Basically; and supplying a reference that addressed all 3 versions... it's much less complex if you don't have to handle the HTTP stuff. (which that does too)
if I have an HTTP socket request on the server I'd like to define like on( "upgrade", (protocol)=>{ is protocol == ;'websocket' ) or something and then be able to or already have on( "message" )
On the other side that made the request, they can keep the HTTP object open and do a http.upgrade( 'websocket' ) and define the appropriate websock methods on that object? Or maybe return a separate websocket object from that.... which can then have message/close/error handlers.
I don't know if the methods get overwritten between HTTP and websock (MDN, Opera, IE, Chrome) all supported it, so I sort of expect it in a core library; it's not a horibble standard, it's masked but only by option, and if it were a semi-native implmeentation with HTTP it might have an easier time dealing with the bytecode length and fragments and other bits ...
mscdex commentedon Feb 28, 2016
In that case, this has been discussed before. See #1010 for example.
d3x0r commentedon Feb 28, 2016
closed as duplicate