Open chirino opened 14 years ago
The spec currently "assumes a reliable 2-way streaming network protocol (such as TCP) underneath". Given that the WebSocket layer splits a TCP stream into messages, a natural question to address in the spec is whether a WebSocket message corresponds to one STOMP frame, or if it can batch multiple frames.
This STOMP client for example buffers frames and flushes them asynchronously, sometimes sending multiple frames in one WebSocket message. Seems like a reasonable optimization.
The biggest issue is that there is a maximum size to the websocket messages. So in my opinion, no they should not correspond 1 to 1. You should be able to place multiple stomp frames in one websocket message or split a stomp frame across multiple websocket messages.
The WebSocket protocol itself doesn't impose limits on the message size. Fragmentation allows messages to be of unknown size.
see: http://groups.google.com/group/stomp-spec/browse_thread/thread/8812531abd8c4b12#