OnConnect() doesn't fire

77 views
Skip to first unread message

josg

unread,
Oct 26, 2012, 6:01:27 AM10/26/12
to socketio-netty
Hi! First of all, thanks for a great work! I've been running the
examples successfully, but somehow it seems that I don't ever get the
"OnConnect"-event on the server side's handler. Am I missing
something?

- josg

yongboy

unread,
Oct 29, 2012, 9:11:25 PM10/29/12
to socketi...@googlegroups.com
Hi,
Sorry write back too later :))
Maybe you need to debug the javascript with firefox + firebug tools.
If you find some bug, please tell me, or fix it.


2012/10/26 josg <joska.k...@gmail.com>

josg

unread,
Oct 30, 2012, 4:51:33 AM10/30/12
to socketio-netty
Thanks for response. I have tried to figure this out, but without
results.

I might need a little advice here. On connect it goes like this

DEBUG [New I/O worker #1] (SocketIOTransportAdapter.java:139) -
2012-10-30 10:40:52,167 - GET request uri /socket.io/1/?
t=1351586452111
DEBUG [New I/O worker #2] (SocketIOTransportAdapter.java:139) -
2012-10-30 10:40:52,227 - GET request uri /socket.io/1/websocket/
e6446b5c-1dd0-495e-ad8d-e0b5cc5980db
DEBUG [New I/O worker #2] (WebSocketTransport.java:59) - 2012-10-30
10:40:52,233 - websocket handls the request ...
DEBUG [New I/O worker #2] (WebSocketTransport.java:62) - 2012-10-30
10:40:52,233 - session id e6446b5c-1dd0-495e-ad8d-e0b5cc5980db
DEBUG [New I/O worker #2] (WebSocketTransport.java:102) - 2012-10-30
10:40:52,250 - the client is null now ...
DEBUG [New I/O worker #2] (WebSocketIO.java:61) - 2012-10-30
10:40:52,251 - websocket writing 1:: for client e6446b5c-1dd0-495e-
ad8d-e0b5cc5980db

After this nothing happens. In WebSocketTransport at method
doPrepareClient(...) there's a commented line:

// this.handler.OnConnect(client);

I might need a little advice what's that for and what's the thing that
should happen in doPrepareClient(...), and what's the thing
that should happen next? This could hel me understand the logic little
more and solve this. Thank you.

- josg

On 30 loka, 03:11, yongboy <yong...@gmail.com> wrote:
> Hi,
> Sorry write back too later :))
> Maybe you need to debug the javascript with firefox + firebug tools.
> If you find some bug, please tell me, or fix it.
>
> 2012/10/26 josg <joska.kalla...@gmail.com>

Xyi Fan

unread,
Nov 21, 2012, 9:36:07 AM11/21/12
to socketi...@googlegroups.com

你好,我这边也发现相似的现象,当新客户端建立连接时没有调用OnConnect方法,或者说现在版本已经不会调用这个方法了呢?
在 2012年10月30日星期二UTC+8上午9时11分26秒,yongboy写道:

Xyi Fan

unread,
Nov 21, 2012, 9:36:20 AM11/21/12
to socketi...@googlegroups.com

你好,我这边也发现相似的现象,当新客户端建立连接时没有调用OnConnect方法,或者说现在版本已经不会调用这个方法了呢?
在 2012年10月30日星期二UTC+8上午9时11分26秒,yongboy写道:
Hi,

josg

unread,
Nov 22, 2012, 8:33:42 AM11/22/12
to socketio-netty
Yes. Please tell me if you find an answer or solution to this.

- josg

On 21 marras, 16:36, Xyi Fan <f250303...@gmail.com> wrote:
> 你好,我这边也发现相似的现象,当新客户端建立连接时没有调用OnConnect方法,或者说现在版本已经不会调用这个方法了呢?
> 在 2012年10月30日星期二UTC+8上午9时11分26秒,yongboy写道:
>
>
>
>
>
>
>
>
>
> > Hi,
> > Sorry write back too later :))
> > Maybe you need to debug the javascript with firefox + firebug tools.
> > If you find some bug, please tell me, or fix it.
>

> > 2012/10/26 josg <joska.k...@gmail.com <javascript:>>

Xyi Fan

unread,
Nov 23, 2012, 1:50:40 AM11/23/12
to socketi...@googlegroups.com
Yes, Now my solution is this.
Server: method OnMessage
if(eventName.equals("connected")){
OnConnect(client);
return;
}

Client: 
socket.on('connect', function() {
console.info("Connected");
socket.emit("connected","");
});
This solution is only temporary.

在 2012年11月22日星期四UTC+8下午9时33分42秒,josg写道:

josg

unread,
Nov 23, 2012, 4:55:40 AM11/23/12
to socketio-netty
Yes, pretty dirty hack, but that's good until we get the proper
solution. Please inform if you got it, thank you.
Reply all
Reply to author
Forward
0 new messages