tcp

package
v0.0.0-...-1c5b680 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAcceptor

func NewAcceptor() lib.Peer

func NewConnector

func NewConnector() lib.Peer

func NewSyncConnector

func NewSyncConnector() lib.Peer

Types

type MsgHooker

type MsgHooker struct {
}

func (MsgHooker) OnInboundEvent

func (this MsgHooker) OnInboundEvent(inputEvent lib.Event) (outputEvent lib.Event)

func (MsgHooker) OnOutboundEvent

func (this MsgHooker) OnOutboundEvent(inputEvent lib.Event) (outputEvent lib.Event)

type TCPMessageTransmitter

type TCPMessageTransmitter struct {
}

func (TCPMessageTransmitter) OnRecvMessage

func (TCPMessageTransmitter) OnRecvMessage(ses lib.Session) (msg interface{}, err error)

func (TCPMessageTransmitter) OnSendMessage

func (TCPMessageTransmitter) OnSendMessage(ses lib.Session, msg interface{}) (err error)

type TcpSockOpt

type TcpSockOpt struct {
	// contains filtered or unexported fields
}

func (*TcpSockOpt) ApplySocketOption

func (this *TcpSockOpt) ApplySocketOption(conn net.Conn)

func (*TcpSockOpt) ApplySocketReadTimeout

func (this *TcpSockOpt) ApplySocketReadTimeout(conn net.Conn, callback func())

func (*TcpSockOpt) ApplySocketWriteTimeout

func (this *TcpSockOpt) ApplySocketWriteTimeout(conn net.Conn, callback func())

func (*TcpSockOpt) Init

func (this *TcpSockOpt) Init()

func (*TcpSockOpt) MaxPacketSize

func (self *TcpSockOpt) MaxPacketSize() int

func (*TcpSockOpt) SetMaxPacketSize

func (self *TcpSockOpt) SetMaxPacketSize(maxSize int)

func (*TcpSockOpt) SetSocketBuffer

func (this *TcpSockOpt) SetSocketBuffer(readBufferSize, writeBufferSize int, noDelay bool)

func (*TcpSockOpt) SetSocketDeadline

func (self *TcpSockOpt) SetSocketDeadline(read, write time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL