Node - the type of node at the remote endpoint.public interface Protocol<Node extends RemoteNode<Node>>
| Modifier and Type | Method and Description |
|---|---|
ShakenSocket<Node> |
initiate(Node remoteNode,
java.net.Socket s)
Initiates a handshake with a remote host at the given address.
|
ShakenSocket<RemoteWorker> |
receive(java.net.Socket s)
Receives a handshake via the given socket.
|
ShakenSocket<Node> initiate(Node remoteNode, java.net.Socket s) throws java.io.IOException
remoteNode - the remote node to connect to.s - the socket on which to initiate a handshake.java.io.IOExceptionShakenSocket<RemoteWorker> receive(java.net.Socket s) throws java.io.IOException
remoteNode - the node at the remote endpoint.s - the socket on which to receive a handshake.java.io.IOException