Receiving messages on ThreadServer client?

43 views
Skip to first unread message

billybombill bob

unread,
Nov 2, 2013, 7:11:20 PM11/2/13
to haxe...@googlegroups.com
I have made a basic server for my game based on the example found at http://haxe.org/doc/neko/threadserver While the server works fine receiving messages from the client I can't seem to read anything off the socket on the client's side. On the server side I have tried using both socket.write() and server.sendData(), and on the client side I have tried using socket.input.readLine(); and socket.read(); and while the server seems to be sending the messages to the client, I do not seem to be receiving anything. My client's socket.setBlocking is false, and any time I try reading from the socket I get 'Uncaught exception - Blocking'. I had success before using the example found on http://haxe.org/doc/neko/client_server, however the ThreadServer seemed like it would be better for my uses (multiplayer game server). I am storing the clients Socket object into an array when they connect and am using that when I try to send messages back to them. Is there a way I can send data back to the client using the ThreadServer example?
Reply all
Reply to author
Forward
0 new messages