static fun createHandshake(keyPair: KeyPair, remotePublicKey: PublicKey, initAndResponse: Function<Bytes, AsyncResult<Bytes>>): AsyncResult<RLPxConnection>
(source)
Creates a complete interaction to run a handshake with a remote peer.
remotePublicKey
- the peer public key
initAndResponse
- a function giving us the peer response, and allowing us to respond to them to finalize the handshake
Return
a future RLPxConnection created as the result of the handshake