Skip to content

x/net/websocket: messages not exposed in package API #7632

@gopherbot

Description

@gopherbot

by [email protected]:

WebSocket peers exchange messages. A message is composed of one or more frames.

The (*Conn).Read and (Codec).Receive methods return a single frame. There is no
mechanism to detect message boundaries or otherwise compose frames into a message.

To use this package, an application must provide its own framing or assume that the peer
sends single frame messages. My guess is that most applications assume that the peer
sends single frame messages because that's what browsers and the websocket package do.
This assumption is not true of all peers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions