Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] WebSockets and the frame parameter

Hey Erin,

Since you mentioned that link to websockts.plt, it got me thinking it's probably written in the WebSockets protocol spec...
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-68#section-1.2 (see bottom of page 4)

It appears you are right about the frame determining the "type" of message.
As it stands right now though, only frame=0x00 is actually used, but in the future could allow for different message types.
So for now, as I'm go with the frame will always be 0x00 for normal messages.

Hope this helps.

On Sun, Jan 24, 2010 at 3:06 PM, Erin Drummond <erin.dru@xxxxxxxxx> wrote:
As the poster of the previous posting, I would also like to know this.
Its highly confusing and seems unnecessary.

I found a page here:
http://planet.plt-scheme.org/package-source/murphy/websockets.plt/1/0/planet-docs/main/Exchanging_WebSocket_Messages.html
which states:

"The message can be either a byte string, which will be sent with
frame type 128 and length information, or a string, which will be sent
with frame type 0 and without length information"
So it looks like frame number denotes a "type" of message (if the
information is correct, it might only apply to the scheme
implementation). Would a dev *please* clarify?

Its a pity this mailing list seems dead.

On Mon, Jan 25, 2010 at 7:11 AM, Peter Wong <peter.wm.wong@xxxxxxxxx> wrote:
> Hi,
> Could someone explain the meaning and usage of the frame parameter used
> by WebSocket and WebSocket.Outbound methods for sending/receiving?
> The current documentation
> (http://download.eclipse.org/jetty/7.0.1.v20091125/apidocs/org/eclipse/jetty/websocket/WebSocket.Outbound.html)
> lacks any information about the meaning or usage of this parameter.
> A similar question has already been brought up in a previous
> posting: http://dev.eclipse.org/mhonarc/lists/jetty-users/msg00192.html
> So I (the WebSocket implementer and caller of WebSocket.Outbound) am unsure
> what to do with this parameter when I receiving messages and what value to
> provide when sending messages.
> a) Do I need to keep track of the "current" frame when sending?
>     (Does the last received message's frame dictate the frame I should send
> with?)
> b) Do I always just supply 0?
>     (Quick tests with small messages appear show this "works"...)
> c) None of the above....
> Some clarification would be greatly appreciated.
> Thanks.
> --
> ~ Peter Wong
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
~ Peter Wong

Back to the top