public class ServerConnection extends Connection
Connection.event| Constructor | Description |
|---|---|
ServerConnection(TcpServer server,
java.net.Socket socket,
java.security.PublicKey key,
java.io.PrintWriter outgoing) |
| Modifier and Type | Method | Description |
|---|---|---|
java.security.PublicKey |
getKey() |
|
void |
replyCommand(java.lang.String command,
java.lang.String arguments) |
Sends a command to the client connected through this connection
|
void |
replyText(java.lang.String data) |
Sends a simple message to the client connected through this connection
|
getConnectionCreated, getSocketpublic ServerConnection(TcpServer server, java.net.Socket socket, java.security.PublicKey key, java.io.PrintWriter outgoing)
server - the TcpServer currently accepting client connectionssocket - the actual Socket that the client is connected tokey - the PublicKey used for encrypting messages to be sent to the clientoutgoing - the PrintWriter used for sending messages to the clientpublic void replyText(java.lang.String data)
data - text to be sentpublic void replyCommand(java.lang.String command,
java.lang.String arguments)
command - command to be sentarguments - the command argumentspublic java.security.PublicKey getKey()