nguyenvulebinh / kryonet

Automatically exported from code.google.com/p/kryonet
0 stars 0 forks source link

Client - Register listener before connecting to srever #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This might be obvious to many people, but when i set the client up for the 
first time with my own listener, it didn't occur to me that the registering of 
the listener, had to be before the connection to the server. And i don't see 
any mentioning of it.

It will still work if the connection to the server is slower than what it takes 
to add the listener. So it's a problem where sometimes it works perfectly, and 
sometimes it doesn't work at all.

Maybe tell people with some bold text, that the registering the listener has to 
be before client.connect() so nobody will run into the same problem again?

Original issue reported on code.google.com by madsen...@gmail.com on 12 Oct 2013 at 8:19