Skip to content

Socket messages appear to be one behind #2

@mm-marcela

Description

@mm-marcela

I'm connecting to a socket.io server (netty) using this FlashSocket.IO library

Everything (connection, handshake, protocol upgrade) seems to work correctly, but when it comes time to start sending/receiving messages via the actual socket, I'm noticing an odd trend: all of the responses to my messages are behind by 1.

The most basic example I can give is that I have to send two PINGs before I receive a single PONG, and the PONG that I do receive is actually a response to the first PING.

A more detailed example: I send a message with a room ID. This message is supposed to receive a response in the form of "room-ID activated." I will not receive that response until after another message is sent from the server.

I can force the server to send another message by following the room ID message with a PING. This triggers a PONG sent from the server, but the only message I receive on the client side is the "room-ID activated" message.

I have a feeling the problem lies somewhere within this FlashSocket.IO library, but I'm not sure exactly where to look. I know for a fact that the server is sending all the messages it's supposed to send because I have a test app written in JavaScript using socket.io's client and it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions