package
0.0.0-20210712090754-55a2f5289189
Repository: https://github.com/d-platformoperatingsystem/dpos.git
Documentation: pkg.go.dev

# Packages

Package broadcast broadcast protocol.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package types protocol and stream register `.

# Functions

AuthenticateMessage authenticates p2p message.
ClearEventHandler clear event handler map, plugin p2p , ,.
CloseStream closes the stream after writing, and waits for the EOF.
EventHandlerWithRecover warps the event handler with recover for catching the panic while processing message.
GetEventHandler gets event handler by event ID.
HandleEvent handle p2p event.
HandlerWithAuth wraps HandlerWithRead with authenticating.
HandlerWithAuthAndSign wraps HandlerWithRW with signing and authenticating.
HandlerWithClose wraps handler with closing stream and recovering from panic.
HandlerWithRead wraps handler with reading, closing stream and recovering from panic.
HandlerWithRW wraps handler with reading, writing, closing stream and recovering from panic.
Init init p2p protocol.
InitAllProtocol initials all protocols.
ReadStream reads message from stream.
ReadStreamAndAuthenticate verifies the message after reading it from the stream.
RegisterEventHandler registers a handler with an event ID.
RegisterProtocolInitializer registers the initial function.
SignAndWriteStream signs the message before writing it to the stream.
WriteStream writes message to stream.

# Constants

all protocols.
p2pstore protocols.
all protocols.
all protocols.
all protocols.
all protocols.
sync protocols.
all protocols.

# Structs

P2PEnv p2p.

# Type aliases

EventHandler handle dplatformos event.
Initializer is a initial function which any protocol should have.