tuweni / org.apache.tuweni.rlpx.wire / DefaultWireConnection / <init>

<init>

DefaultWireConnection(nodeId: Bytes!, peerNodeId: Bytes!, writer: Consumer<RLPxMessage!>!, afterHandshakeListener: Consumer<HelloMessage!>!, disconnectHandler: Runnable!, subprotocols: LinkedHashMap<SubProtocol!, SubProtocolHandler!>!, p2pVersion: Int, clientId: String!, advertisedPort: Int, ready: CompletableAsyncResult<WireConnection!>!, peerHost: String!, peerPort: Int)

Default constructor.

Parameters

nodeId - Bytes!: the node id of this node

peerNodeId - Bytes!: the node id of the peer

writer - Consumer<RLPxMessage!>!: the message writer

afterHandshakeListener - Consumer<HelloMessage!>!: a listener called after the handshake is complete with the peer hello message.

disconnectHandler - Runnable!: the handler to run upon receiving a disconnect message

subprotocols - LinkedHashMap<SubProtocol!, SubProtocolHandler!>!: the subprotocols supported by this connection

p2pVersion - Int: the version of the devp2p protocol supported by this client

clientId - String!: the client ID to announce in HELLO messages

advertisedPort - Int: the port we listen to, to announce in HELLO messages

ready - CompletableAsyncResult<WireConnection!>!: a handle to complete when the connection is ready for use.

peerHost - String!: the peer's host

peerPort - Int: the peer's port