Documentation ¶
Index ¶
Constants ¶
View Source
const ( IncomingMessage = 0x1 IncomingStream = 0x2 )
Variables ¶
This section is empty.
Functions ¶
func NOPHandshakeFunc ¶
Types ¶
type DefaultDecoder ¶
type DefaultDecoder struct{}
type GOBDecoder ¶
type GOBDecoder struct{}
type HandshakeFunc ¶
type TCPPeer ¶
func (*TCPPeer) CloseStream ¶
func (p *TCPPeer) CloseStream()
type TCPTransport ¶
type TCPTransport struct { TCPTransportOpts // contains filtered or unexported fields }
func NewTCPTransport ¶
func NewTCPTransport(opts TCPTransportOpts) *TCPTransport
func (*TCPTransport) Addr ¶
func (t *TCPTransport) Addr() string
func (*TCPTransport) Close ¶
func (t *TCPTransport) Close() error
func (*TCPTransport) Consume ¶
func (t *TCPTransport) Consume() <-chan RPC
func (*TCPTransport) Dial ¶
func (t *TCPTransport) Dial(addr string) error
func (*TCPTransport) ListenAndAccept ¶
func (t *TCPTransport) ListenAndAccept() error
type TCPTransportOpts ¶
type TCPTransportOpts struct { ListenAddr string HandshakeFunc HandshakeFunc Decoder Decoder OnPeer func(Peer) error }
Click to show internal directories.
Click to hide internal directories.