Caucho Forums

Caucho Forums (
-   Resin (
-   -   Resin and Websocket on Atmosphere (

survivant 06-17-2010 01:19 PM

Resin and Websocket on Atmosphere
Hello, I'm working to port Resin websocket on Atmosphere framework.

We are having few problems when we try to write response to the client.

#1 - The first problem that we had is a IllegalStateException when writting.

In Atmosphere we are doing this :

public void write(byte frame, String data) throws IOException {

it crash at the first line. (is it because in HttpServletRequestImpl.startWebSocket you are wrinting headers into response and it's commited before calling the onWrite ?)

#2 - On my computer the close is always call before the write method.

SocketLinkListener Thread is looking for available byte to read, and get -1 after the first read. (the first loop it reads 18 chars (in my test)).

we setted the timeout at 120 000 but in this SocketLinkListener

if (_isKeepaliveSelectEnable) {
timeout = getBlockingTimeoutForSelect();

overide the value to 1000.

my question is how can I skip the validation if I want to suspend the Websocket connection ?

We are testing with the Atmosphere-websocket-chat example.

if we run in debug mode.. we will be able to see the the welcome message sent by the server when we join the chat, but as soon as we resume SocketLinkListener it will get -1, and call onClose.

I hope that you can help us to put Resin on Atmosphere.

You can contact us by twitter too. @survivant or @atmo_framework


ferg 06-17-2010 07:52 PM

Thanks. I'll need to check on that.

I assume the object with the context is a per-request object?

survivant 06-17-2010 07:59 PM

good question, not sure. I will get back to you on that one.

you can check our ResinWebSocket implementation on Atmosphere here

this class handle the service() that will take action and call Resin's websockets

this class will handle the start,read,write,close calls from Resin's websockets

survivant 06-22-2010 07:43 PM

I hope we could include Resin in the supported container for the next Atmosphere release this summer.


survivant 06-25-2010 12:22 AM

application sample
here the application you have to make it works on Resin 4.

works on other WebSockets Webservers.

you can download the war from here :

just deploy that.

smart61 03-01-2013 11:47 PM

Any progress on this front?
I really need Atmosphere on Resin 4.x including websockets support. What is the status of this port?

Yttesen 04-04-2014 05:58 AM

Any news on websocket support for Atmosphere?

All times are GMT. The time now is 05:45 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.