Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NOHandshakeFunc ¶
Types ¶
type DefaultDecoder ¶
type DefaultDecoder struct{}
type GOBdecoder ¶
type GOBdecoder struct{}
type HandshakeFunc ¶
type TCPTransport ¶
type TCPTransport struct {
// contains filtered or unexported fields
}
Mutex will protect the peers
func NewTCPTransport ¶
func NewTCPTransport(opts TCPTransportOpts) *TCPTransport
func (*TCPTransport) Consume ¶
func (t *TCPTransport) Consume() <-chan RPC
Consume implements the transport interface. Returns read-only channel for reading the incoming messages.
func (*TCPTransport) ListenAndAccept ¶
func (t *TCPTransport) ListenAndAccept() error
type TCPTransportOpts ¶
type TCPTransportOpts struct { ListenAddr string HandShaker HandshakeFunc Decoder Decoder OnPeer func(Peer) error }
Click to show internal directories.
Click to hide internal directories.