Connecting with WebSockets

91 views
Skip to first unread message

A

unread,
Aug 24, 2012, 4:29:54 AM8/24/12
to pl...@googlegroups.com
I'm using TooTallNate's Java-WebSocket to connect to my playn game, but the connection just closes immediately (i.e. the onClose event gets sent but not the onOpen event). There's no error message on either end. This seems strange though since the server works fine making connections with other types of clients.

Has anyone had any luck with other WebSocket server libraries? Or is there something I might be missing in my game's configuration?


leeevan...@gmail.com

unread,
Aug 24, 2012, 8:49:08 AM8/24/12
to pl...@googlegroups.com, leeevan...@gmail.com
Hmm, just thought to test the HTML version. It works fine, but the Java one doesn't.

An issue worth reporting? Or is there something dumb I'm probably doing here still?

scottr...@gmail.com

unread,
Aug 24, 2012, 10:23:09 AM8/24/12
to pl...@googlegroups.com, leeevan...@gmail.com
I'm also using the same websocket implementation for another pure GWT project. This has been absolutely solid for me. 

I also have server side, websocket clients running as well, if it helps, I am extending WebSocketClient in that case.

The HTML implementation will use hooks to the browser to create client side connections.

Of course, this has nothing to do with PlayN, so I can't comment if this is related to your observed issue. I bet you will have to implement for Java/HTML platforms separately. Start out by using the WebSocketClient class and testing in Java, if it works, then you have your next move.

Scott
Reply all
Reply to author
Forward
0 new messages