tuweni / 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 - Bytes!: the initiation message raw bytes

keyPair - KeyPair!: our key pair

responseHandler - Consumer<Bytes!>!: a function to respond back to the peer that we acknowledged the connection

Return
RLPxConnection!: a valid RLPxConnection