Closed danny8002 closed 7 years ago
according to WebSock RCF https://tools.ietf.org/html/rfc6455#section-5.2, I dig into the ws code, then i found every frame data have FIN = 1 which means it is the last frame. so maybe this issue happens in server which send every frame with FIN=1, i will continue to dig.
i have confirmed this issue happens in server side. and just put this issue in here in case other guys also get.
Actual Behavior
Expected Behavior
Server Side, i copy the code from https://docs.microsoft.com/en-us/azure/service-bus-relay/relay-hybrid-connections-dotnet-get-started
and it 'Send' a 4K text data as response.
Client Side, i use nodejs whis this package: ws.onmessage = function(event){ console.log('call'); let data: string; if (typeof event.data === 'string') { data = event.data; } else if (event.data instanceof Uint8Array) { data = new TextDecoder("utf-8").decode(event.data); } else { data = "invalid"; } console.log(data); }
and i found onmessage is called several times, and in every call, 'data' is one of parts of full text data that server sends.
Versions