Skip to content

Wireshark flooded with [PSH, ACK] packets when using websockets #36

@benkuper

Description

@benkuper

This line in Server::poll()
mg_iterate_over_connections(server, iterate_callback, &current_timer);

is sending packet to all websockets connection in a loop, which doesn't seem right.
I tested other websocket libraries and this behavior is not there. It may be related to the other issue I posted.
Generally, either I have no clue on how to use websockets in mongoose or there is something very wrong on how it's implemented :

  • data is sent out constantly at a very fast rate, even when no connection is active
  • websocketReady is called every time a packet is sent from an already connected socket
  • websocketData is not receiving everything, but receives ad vitam eternam the latest data sent
  • sending anything to a connected socket closes the connection with a 1006 status.

Am I missing something here ?? I'm not doing anything fancy, just trying out the library because it's one of the only ones to support both http request AND websocket, WITHOUT relying on Asio, but the websocket part is seems so broken...

Thank you in advance

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