Module polimi.ingsw.am21.codex
Class TCPServerConnectionHandler
java.lang.Object
polimi.ingsw.am21.codex.connection.server.TCP.TCPServerConnectionHandler
- All Implemented Interfaces:
Runnable
Runnable that handles a TCP connection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invokes .send() on all TCPConnectionHandler threads in the poolvoid
handleMessage
(LeaveLobbyMessage message) void
handleMessage
(SendChatMessage message) void
run()
Runs the parser and handler threadsvoid
Sends a message synchronously to the client socket
-
Constructor Details
-
TCPServerConnectionHandler
-
-
Method Details
-
run
public void run()Runs the parser and handler threads -
handleMessage
-
handleMessage
-
send
Sends a message synchronously to the client socket -
broadcast
Invokes .send() on all TCPConnectionHandler threads in the pool- Parameters:
message
- The message to broadcast to all clients
-