Struct p2p::HolePunchInfo
[−]
[src]
pub struct HolePunchInfo { pub tcp: Option<(TcpStream, Token)>, pub udp: Option<(UdpSocket, SocketAddr, Token)>, pub enc_pk: PublicKey, }
A successful result of hole punch will be bundled in this structure
Fields
tcp: Option<(TcpStream, Token)>
TCP socket that successfully managed to hole punch
udp: Option<(UdpSocket, SocketAddr, Token)>
UDP socket that successfully managed to hole punch
enc_pk: PublicKey
Encrypting Asymmetric PublicKey. Peer will use our public key to encrypt and their secret key to authenticate the message. We will use our secret key to decrypt and peer public key to validate authenticity of the message.