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.
nodeId
- the node id of this node
peerNodeId
- the node id of the peer
afterHandshakeListener
- a listener called after the handshake is complete with the peer hello message.
disconnectHandler
- the handler to run upon receiving a disconnect message
subprotocols
- the subprotocols supported by this connection
p2pVersion
- the version of the devp2p protocol supported by this client
clientId
- the client ID to announce in HELLO messages
advertisedPort
- the port we listen to, to announce in HELLO messages