Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] WebSocketClient - with 2013-04-08

That's great. 

I may blog this as I go if you're going to hit the documentation although I hate doing that when it's so little value add.

Cheers for the quick response, 
Max


Sent from Samsung Mobile



-------- Original message --------
From: Joakim Erdfelt <joakim@xxxxxxxxxxx>
Date:
To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
Subject: Re: [jetty-users] WebSocketClient - with 2013-04-08


That is correct.
The early Milestones for the websocket API used WebSocketConnection and RemoteEndpoint.write*().

During the milestones the API slowly evolved to take on some of naming and behavior from JSR-356 (The Java WebSocket API).

This resulted in a name change from WebSocketConnection to Session
and RemoteEndpoint.write*() to RemoteEndpoint.send*()
Along with a few smaller configuration variables name changes.

I'm ashamed of the age of websocket documentation in this regard. :-(
I'll tackle this immediately.

In the meantime you can browse the test cases to find some techniques.

https://github.com/eclipse/jetty.project/tree/master/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples



--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts


On Wed, Apr 17, 2013 at 1:47 PM, Max Kington <mkington@xxxxxxxxxxxxx> wrote:
Hi there,

I've been playing with websockets in Jetty 9, I'm currently using
2013-04-08.  Clearly the api is in flux somewhat so examples on the
t'internet seem to be a little out of date.  Also for alot of the client
source, many of the relevent git links reference dead or defunct
branches and stacks of now dead code.

I *think* I've worked out the changes in WebSocketListener
onWebSocketConnect(WebSocketConnection) -> onWebSocketConnect(Session)
and send messages back and forth using
session.getRemoteEndPoint().send*().  I noticed though that the methods
have gone from write*() to send*() so I just would like confirming that
I'm not too close to the metal and I am using the appropriate level of
abstraction (i.e. the as far away from the guts until I have e genuine
need to go lower).

I found,
http://jetty.4.x6.nabble.com/jetty-users-Jetty-9-and-WebSocket-td4960163.html#a4960172,
which suggests a chap is doing the same but never saw that tailed.

My use case fwiw will involve a number of non browser based clients so
I'm going to be very biased towards using these libraries.

Cheers,
Max Kington

p.s. Can I update docs/wiki somewhere with examples as I go?
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top