Closed ricardojlrufino closed 7 years ago
On server I'm using this dependencies:
<properties> <jersey-version>1.19</jersey-version> <jaxb-version>2.1</jaxb-version> <nettosphere-version>2.4.11-SNAPSHOT</nettosphere-version> <atmosphere-version>2.4.7</atmosphere-version> <atmosphere-extensions>2.4.3</atmosphere-extensions> <shiro-version>1.2.4</shiro-version> </properties>
I had many problems upgrading nettosphere to version 3.0.0
I found an alternative, send a PING along with the connection response
I changed in my server from
Return Response.status (Response.Status.OK) .build ();
To:
@GET
@Suspend(contentType = "application/json", listeners = WSEventsLogger.class)
public Response onConnect() {
resource.getRequest().setAttribute("lastConnectionDate", new Date());
return Response.ok("X").build();
}
Debugging the WebSocketTransport.TextListener class, I'm noticing that it is bypassing the first message sent by the server.
My flow is this: when the client connects, it sends a message to the server requesting data, and the server responds with that data.
I see the message being received by:
However the protocolReceived attribute is false
Using - wasync 2.1.4