Class ClientHandler

java.lang.Object
net.vincent.communidirect.server.ClientHandler

public class ClientHandler extends Object
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 Details

    • ClientHandler

      public ClientHandler(ServerLauncher serverLauncher)
      Constructs a ClientHandler and ensures the message storage directory exists.
      Parameters:
      serverLauncher - the owning server launcher
  • Method Details

    • init

      public void init(ServerSocket serverSocket)
      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