gate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	WriteMsg(msg interface{})
	Close()
	UserData() interface{}
	SetUserData(data interface{})
}

type TCPAgent

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

func (*TCPAgent) Close

func (a *TCPAgent) Close()

func (*TCPAgent) OnClose

func (a *TCPAgent) OnClose()

func (*TCPAgent) Run

func (a *TCPAgent) Run()

func (*TCPAgent) SetUserData

func (a *TCPAgent) SetUserData(data interface{})

func (*TCPAgent) UserData

func (a *TCPAgent) UserData() interface{}

func (*TCPAgent) WriteMsg

func (a *TCPAgent) WriteMsg(msg interface{})

type TCPGate

type TCPGate struct {
	Addr              string
	MaxConnNum        int
	PendingWriteNum   int
	LenMsgLen         int
	MinMsgLen         uint32
	MaxMsgLen         uint32
	LittleEndian      bool
	JSONProcessor     *json.Processor
	ProtobufProcessor *protobuf.Processor
	AgentChanRPC      *chanrpc.Server
}

func (*TCPGate) OnDestroy

func (gate *TCPGate) OnDestroy()

func (*TCPGate) Run

func (gate *TCPGate) Run(closeSig chan bool)

Jump to

Keyboard shortcuts

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