class DefaultWireConnection : WireConnection
(source)
A stateful connection between two peers under the Devp2p wire protocol.
DefaultWireConnection(id: String, nodeId: Bytes, peerNodeId: Bytes, logger: Logger, writer: Consumer<RLPxMessage>, afterHandshakeListener: Consumer<HelloMessage>, disconnectHandler: Runnable, subprotocols: LinkedHashMap<SubProtocol, SubProtocolHandler>, p2pVersion: Int, clientId: String, advertisedPort: Int)
Default constructor. |
fun disconnect(reason: DisconnectReason): Unit
Sends a message to the peer explaining that we are about to disconnect. |
|
fun handleConnectionStart(): Unit |
|
fun id(): String |
|
fun messageReceived(message: RLPxMessage): Unit |
|
fun sendMessage(subProtocolIdentifier: SubProtocolIdentifier, messageType: Int, message: Bytes): Unit |
|
fun sendPing(): AsyncCompletion
Sends a ping message to the remote peer. |
|
fun toString(): String |