[][src]Crate quic_p2p

quic-p2p enables communication within a peer to peer network over the QUIC protocol.

Structs

Builder

Builder for QuicP2p. Convenient for setting various parameters and creating QuicP2p.

Config

QuicP2p configurations

NodeInfo

Information for a peer of type Peer::Node.

QuicP2p

Main QuicP2p instance to communicate with QuicP2p

SerialisableCertificate

To be used to read and write our certificate and private key to disk esp. as a part of our configuration file

Enums

Error

Error types encountered during the operation of this library.

Event

QuicP2p Events to the user

OurType

Whether we are a client or a node

Peer

Representation of a peer to us.

Constants

DEFAULT_IDLE_TIMEOUT_MSEC

Default interval within which if we hear nothing from the peer we declare it offline to us.

DEFAULT_KEEP_ALIVE_INTERVAL_MSEC

Default Interval to send keep-alives if we are idling so that the peer does not disconnect from us declaring us offline. If none is supplied we'll default to the documented constant.

DEFAULT_MAX_ALLOWED_MSG_SIZE

Default maximum allowed message size. We'll error out on any bigger messages and probably shutdown the connection. This value can be overridden via the Config option.

DEFAULT_PORT_TO_TRY

In the absence of a port supplied by the user via the config we will first try using this before using a random port.

Type Definitions

R

Result used by QuicP2p.

Token

Token accepted during sends and returned back to the user to help identify the context.