How to run the socketio-chat demo with atmosphere

170 views
Skip to first unread message

Kenny

unread,
Jun 25, 2012, 10:08:35 AM6/25/12
to socketi...@googlegroups.com
i have been tried to run the demo one day.

Server comet: atmosphere 1.0.0
Client : SocketIO 0.9.6

i resolved some error.

and from tomcat6 to tomcat7 .

in tomcat7, it looks like can work. but at last, a message from tomcat 7:

5171 [http-nio-8080-exec-6] WARN org.atmosphere.cpr.AtmosphereFramework - Failed using
comet support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket,
error: Tomcat failed to detect this is a comet application because context.xml
is missing or the Http11NioProtocal Connector is not enabled.
If That's not the case, you can alse remove META-INF/context.xml and WEB-INF/lib/atmosphere-compact-tomcat.jar
is the Nio or Apr Connector enabled?
5171 [http-nio-8080-exec-6] WARN org.atmosphere.cpr.AtmosphereFramework - Using
org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket

Has anyone been seen this situation before?

Beat Regards to reply :)

yongboy

unread,
Jun 25, 2012, 9:30:01 PM6/25/12
to socketi...@googlegroups.com
hi:
   I am sorry to say that, I do not know the atmosphere framework at all. The socketio-netty project just base on netty nio framework , not atmosphere.
   Maybe those posts will be usefull:
   http://www.ibm.com/developerworks/web/library/wa-reverseajax4/
   https://github.com/Atmosphere/atmosphere/wiki/Getting-Started-with-Socket.IO

Kenny

unread,
Jun 29, 2012, 2:30:43 AM6/29/12
to socketi...@googlegroups.com
Dear, Yongboy
Yes, that's right

i just use the demo.

but it does not work correct with bellow server:

public class SocketIOServer {

    public static void main(String[] args) throws IOException {
        new Nettosphere.Builder().config(
                new Config.Builder()
                        .port(8080)
                        .host("127.0.0.1")
                        .resource(SocketIOChatAtmosphereHandler.class)
                        .build())
                .build().start();
    }   
}

what's the Nettosphere, i donot know about it. it looks so bad. i can find my index.html page after run in eclipse.
and when id visit it with any url  e.g."http://localhost:8080/XXX", it still return OK code :200 to me, i donot know why.
Could you help me trying the demo? yongboy: Where are you from ?
Best Regard
Yao Fang :)

在 2012年6月25日星期一UTC-7下午6时30分01秒,yongboy写道:

yongboy

unread,
Jun 29, 2012, 3:43:38 AM6/29/12
to socketi...@googlegroups.com
please send your demo to me . my mail is yong.boyATgmail.com .

方垚

unread,
Jun 29, 2012, 5:06:00 AM6/29/12
to socketi...@googlegroups.com
hello yongboy

you can download the demo from  https://github.com/Atmosphere/atmosphere 

in the zip, you can find socketio-chat project in the samples directory.

thx :)
kenny

2012/6/29 yongboy <yon...@gmail.com>

yongboy

unread,
Jul 5, 2012, 5:34:58 AM7/5/12
to socketi...@googlegroups.com
I download the code, then put the Atmosphere-atmosphere\samples\socketio-chat\src\main\webapp into tomcat, and run the code :


public class SocketIOServer {
    public static void main(String[] args) throws IOException {
        new Nettosphere.Builder().config(
                new Config.Builder()
                        .port(8080)
                        .host("127.0.0.1")
                        .resource(SocketIOChatAtmosphereHandler.class)
                        .build())
                .build().start();
    }  
}

In Eclipse .

The demo does not work at all.

I have no time to have a look at Atmosphere's socket.io code, maybe you need to contact the project's author. : ))

方垚

unread,
Jul 10, 2012, 7:16:05 AM7/10/12
to socketi...@googlegroups.com
I have been contacted the author, but can not get help

I already update the demo, and i can run it in the tomcat.

but i have a question now,    the client will stop reconnect to server  auto. and the time does not regular.

2012/7/5 yongboy <yon...@gmail.com>

yongboy

unread,
Jul 10, 2012, 10:56:49 PM7/10/12
to socketi...@googlegroups.com
Tomcat provides support for WebSocket as defined by RFC 6455.
http://tomcat.apache.org/tomcat-7.0-doc/web-socket-howto.html

But the netty framework supports all of WebSocket Drafts.

2012/7/10 方垚 <fy.k...@gmail.com>

方垚

unread,
Jul 11, 2012, 10:07:20 PM7/11/12
to socketi...@googlegroups.com
THX yongboy

but we have already decided to work with tomcat 6

Yao Fang

2012/7/10 yongboy <yon...@gmail.com>

方垚

unread,
Jul 11, 2012, 10:21:29 PM7/11/12
to socketi...@googlegroups.com
Now I try another framework to connect to atmosphere.
JQuery.Atsmosphere

but met a question:
it will send 1:: 
or send 2::    etc.

to the atmosphere  auto.

and I donot why.

Did you meet the Situation before?

please let me know.

thx
Yao Fang

2012/7/11 方垚 <fy.k...@gmail.com>

yongboy

unread,
Jul 12, 2012, 11:42:42 PM7/12/12
to socketi...@googlegroups.com
Maybe you need to have a look at the socket.io's protocol at first :
https://github.com/LearnBoost/socket.io-spec

I suggest you choose the socketio-netty framework instead of Atsmosphere, with spring embed with  tomcat or run it alone. 

2012/7/12 方垚 <fy.k...@gmail.com>
Reply all
Reply to author
Forward
0 new messages