[][src]Module pea2pea::protocols

Opt-in protocols available to the Node.

Structs

HandshakeHandler

An object dedicated to handling connection handshakes; used in the Handshaking protocol.

ReadingHandler

An object dedicated to spawning tasks handling inbound messages from new connections; used in the Reading protocol.

WritingHandler

An object dedicated to spawning outbound message handlers; used in the Writing protocol.

Traits

Handshaking

Can be used to specify and enable network handshakes. Upon establishing a connection, both sides will need to adhere to the specified handshake rules in order to finalize the connection and be able to send or receive any messages.

Reading

Can be used to specify and enable reading, i.e. receiving inbound messages. If handshaking is enabled too, it goes into force only after the handshake has been concluded.

Writing

Can be used to specify and enable writing, i.e. sending outbound messages. If handshaking is enabled too, it goes into force only after the handshake has been concluded.

Type Definitions

ReturnableConnection

An object allowing a Connection to be "borrowed" from the owning Node to enable a protocol and to be sent back to it once it's done its job.