The connection is established and remains open now, whoohoo!
Although some other problems arose...
If I call e.g. ws.send( JSON.stringify( { "type":'discoveryResponse', "data":[] } ) );, then the connection gets closed, and the server logs the following:
14:47:53.714 [vert.x-eventloop-thread-0] INFO com.my.GatewayWSVerticle - registered WS for [11.111.111.111]
14:48:26.090 [vert.x-eventloop-thread-0] ERROR i.vertx.core.net.impl.ConnectionBase - io.netty.handler.codec.CorruptedFrameException: unmasked client to server frame
14:48:26.090 [vert.x-eventloop-thread-0] INFO com.my.GatewayWSVerticle - unregistered WS for [11.111.111.111]
If I call ws.initializeConnection(); then I get to see the following in the logs:
14:50:14.331 [vert.x-eventloop-thread-0] ERROR i.vertx.core.net.impl.ConnectionBase - io.netty.handler.codec.CorruptedFrameException: unmasked client to server frame
14:50:14.331 [vert.x-eventloop-thread-0] ERROR i.vertx.core.net.impl.ConnectionBase - io.netty.handler.codec.DecoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The connection is established and remains open now, whoohoo!
Although some other problems arose...
If I call e.g.
ws.send( JSON.stringify( { "type":'discoveryResponse', "data":[] } ) );
, then the connection gets closed, and the server logs the following:If I call
ws.initializeConnection();
then I get to see the following in the logs: