Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java TCP Sockets

Name: Anonymous 2012-10-30 8:55

EXPLAIN TO ME THIS WIZARDRY;

I have a Java server handling 3 TCP ServerSockets.

I have a client that connects to 1, hereby getting transferred a hashmap containing the info (protocol, port) to connect to the other 2 (game and chat server)

The clients closes the first connection and creates 1 to the game server, one to the chat server.
The client then sends a message trying to see if he's at the correct one, and should receive a code to confirm he's connected.

HOWEVER. For whatever random as fuck reason, when I send a package to the ChatServer at port 4462, the serverSocket at 4461 receives it, and the message sent to 4461 (gameServer) is NOWHERE TO BE FUCKING FOUND.

I get a different result every time I reboot the client. Either the package sent to the request server gets received by the gameserver, or the package sent to chatserver gets received by the gameserver.


CLIENT

TCPCommunicator: chat: connected to localhost:4462
TCPCommunicator: chat: Sending 302 to localhost/127.0.0.1:4462


SERVER

DataResponder - New TCP client at 0.0.0.0/0.0.0.0
DataResponder waiting for new connections at port 4461
>>> TCPConnectedClient: DataResponder waiting for packets
Dataresponder received 302

WHYYYYYYYYYYYYYY.

Name: Anonymous 2012-10-30 11:37

Anon, I love you. Upon implementing ServerSocketFactory everything is going smooth as silk.

You have my thanks.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List