Class ClientHandler
java.lang.Object
net.vincent.communidirect.server.ClientHandler
Handles incoming CDIR connections: accepts each socket, delegates to
CdirMessage.decode(java.io.InputStream, java.security.PrivateKey, byte[]) for protocol
parsing and signature verification, then persists the plaintext payload to
~/.communidirect/msg/YYYYMMDD_HHMMSS_IP.msg.-
Constructor Summary
ConstructorsConstructorDescriptionClientHandler(ServerLauncher serverLauncher) Constructs aClientHandlerand ensures the message storage directory exists. -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(ServerSocket serverSocket) Stores the server socket reference, then enters the blocking accept loop.
-
Constructor Details
-
ClientHandler
Constructs aClientHandlerand ensures the message storage directory exists.- Parameters:
serverLauncher- the owning server launcher
-
-
Method Details
-
init
Stores the server socket reference, then enters the blocking accept loop. This method does not return under normal operation.- Parameters:
serverSocket- the bound server socket to accept connections from
-