Search found 8 matches

by AndrewS
Mon Dec 18, 2017 5:26 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

Results were achieved on 64-bit Windows 7 Professional SP1 in Google Chrome 63.0.3239.84.
Firefox 57.0.2 and IE 11.0.9600.17843 hangs after sending and receiving first message (Netburner reports that socket is closed).

Browser debugging tools seems to not influence on situation.
by AndrewS
Fri Dec 08, 2017 4:25 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

Ok, so here're the code and the screenshot of output: main.cpp /* Revision: 2.8.4 */ /****************************************************************************** * Copyright 1998-2017 NetBurner, Inc. ALL RIGHTS RESERVED * * Permission is hereby granted to purchasers of NetBurner Hardware to use o...
by AndrewS
Tue Dec 05, 2017 8:00 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

Last byte shows up with next message ("dMessage is send"). Here's capture file in attachment: 192.168.127.145 - NetBurner (server) 192.168.127.150 - PC (client) Client sends "Message to send" text message to server, server reads it and send it back. Frames 130-134 are how normal ...
by AndrewS
Mon Dec 04, 2017 6:33 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

I've removed it, but it does not help. The problem is that I'm getting wrong WebSocket header: header says that the payload length is N and the FIN bit is set, but actual payload length is N -1. I'll get this last byte only with next frame. But I can't even know that the message I'm receiving is inc...
by AndrewS
Fri Dec 01, 2017 12:40 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

That's correct. I'm using almost the same code as in the Echo example. while (1) { OSSemPend( &waitingForWS, 0 ); while (ws_fd > 0) { FD_SET(ws_fd, &read_fds); FD_SET(ws_fd, &error_fds); select(1, &read_fds, NULL, &error_fds, 0); if (FD_ISSET(ws_fd, &error_fds)) { iprintf(&qu...
by AndrewS
Thu Nov 30, 2017 7:03 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

Because Im sending messages with one second interval. Can you please tell me how to use select?
by AndrewS
Thu Nov 30, 2017 2:02 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

Re: WebSocket receiving mangled messages

Yes, I'm starting packet capture before opening WebSocket and Wireshark recognizes most of the WS messages, and their payload and length are correct. Maybe it has to do with some TCP optimization algorithm (Nagle?), I've tried NB::WebSocket::ws_setoption(ws_fd, SO_NONAGLE); but it seems not helping ...
by AndrewS
Tue Nov 28, 2017 6:37 am
Forum: NetBurner Software
Topic: WebSocket receiving mangled messages
Replies: 16
Views: 14261

WebSocket receiving mangled messages

I'm using MOD54415. I've slightly modified the \StandardStack\WebSockets\Echo\ example so that it sends messages with an interval of 1 second: // From index.htm function WebSocketTest() { if ("WebSocket" in window) { // Let us open a web socket var ws = new WebSocket("ws://<!--VARIABL...