rlpx / org.apache.tuweni.rlpx / RLPxConnectionFactory / respondToHandshake

respondToHandshake

static fun respondToHandshake(initiatorMessageBytes: Bytes, keyPair: KeyPair, responseHandler: Consumer<Bytes>): RLPxConnection (source)

Creates a RLPxConnection in response to a handshake initiation message.

Parameters

initiatorMessageBytes - the initiation message raw bytes

keyPair - our key pair

responseHandler - a function to respond back to the peer that we acknowledged the connection

Return
a valid RLPxConnection