Hi,
I'm looking at some Web Socket code. The browser based example (thanks Seth) works fine but when I transfer it across to a command line app (using dart:io) I get an error : Socket closed HttpParserException: Connection closed before full header was received.
Note I'm not seeing the socket open output.
Is it expected that dart:io based websockets should be working? I'm on editor build 13393 and SDK 13387.
Thanks
Pete
initWebSocket() {
..onopen = () {;
print("Socket open");
connected = true;
print(socket.readyState);
socket.send("Hello from Dart");
}
..onclose = (e) {
print("Socket closed ${(e as CloseEvent).reason}");
connected = false;
}
..onerror = (e) {
print("Socket error ${e}");
connected = false;
}
..onmessage = (e) {
print((e as MessageEvent).toString());
};
}