Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Resin

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2010, 01:19 PM
survivant survivant is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default 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 :

@Override
public void write(byte frame, String data) throws IOException {
context.getOutputStream().write(0x00);
context.getOutputStream().write(data.getBytes());
context.getOutputStream().write(0xff);
context.getOutputStream().flush();
}

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

thanks
Reply With Quote
  #2  
Old 06-17-2010, 07:52 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

Thanks. I'll need to check on that.

I assume the object with the context is a per-request object?
Reply With Quote
  #3  
Old 06-17-2010, 07:59 PM
survivant survivant is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default

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
http://github.com/jfarcand/atmospher...etSupport.java

this class will handle the start,read,write,close calls from Resin's websockets
http://github.com/jfarcand/atmospher...etRequest.java
Reply With Quote
  #4  
Old 06-22-2010, 07:43 PM
survivant survivant is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default

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

thanks
Reply With Quote
  #5  
Old 06-25-2010, 12:22 AM
survivant survivant is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default 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 : http://www.mediafire.com/file/k1nmvn...ocket-chat.war

just deploy that.
Reply With Quote
  #6  
Old 03-02-2013, 12:47 AM
smart61 smart61 is offline
Junior Member
 
Join Date: Feb 2013
Posts: 3
Default Any progress on this front?

I really need Atmosphere on Resin 4.x including websockets support. What is the status of this port?
Reply With Quote
  #7  
Old 04-04-2014, 05:58 AM
Yttesen Yttesen is offline
Junior Member
 
Join Date: Nov 2010
Posts: 9
Default Progress

Any news on websocket support for Atmosphere?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:05 PM.


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