iface

package
v0.0.0-...-2d5d85b Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IClientProtocol

type IClientProtocol interface {
	OnConnectionMade(fconn Iclient)
	OnConnectionLost(fconn Iclient)
	StartReadThread(fconn Iclient)
	InitWorker(int32)
	AddRpcRouter(interface{})
	GetMsgHandle() Imsghandle
	GetDataPack() Idatapack
}

type ICommand

type ICommand interface {
	Run([]string) string
	Help() string
	Name() string
}

type ICommandInterpreter

type ICommandInterpreter interface {
	AddCommand(ICommand)
	Excute(string) string
	IsQuitCmd(string) bool
}

type IServerProtocol

type IServerProtocol interface {
	OnConnectionMade(fconn Iconnection)
	OnConnectionLost(fconn Iconnection)
	StartReadThread(fconn Iconnection)
	InitWorker(int32)
	AddRpcRouter(interface{})
	GetMsgHandle() Imsghandle
	GetDataPack() Idatapack
}

type IWriter

type IWriter interface {
	Send([]byte) error
	GetProperty(string) (interface{}, error)
	SetProperty(string, interface{})
	RemoveProperty(string)
}

type Iclient

type Iclient interface {
	Start()
	Stop(bool)
	GetConnection() *net.TCPConn
	Send([]byte) error
	GetProperty(string) (interface{}, error)
	SetProperty(string, interface{})
	RemoveProperty(string)
}

type Iconnection

type Iconnection interface {
	Start()
	Stop()
	GetConnection() *net.TCPConn
	GetSessionId() uint32
	Send([]byte) error
	SendBuff([]byte) error
	RemoteAddr() net.Addr
	LostConnection()
	GetProperty(string) (interface{}, error)
	SetProperty(string, interface{})
	RemoveProperty(string)
}

type Iconnectionmgr

type Iconnectionmgr interface {
	Add(Iconnection)
	Remove(Iconnection) error
	Get(uint32) (Iconnection, error)
	Len() int
}

type Idatapack

type Idatapack interface {
	GetHeadLen() int32
	Unpack([]byte) (interface{}, error)
	Pack(uint32, interface{}) ([]byte, error)
}

type Imsghandle

type Imsghandle interface {
	DeliverToMsgQueue(interface{})
	DoMsgFromGoRoutine(interface{})
	AddRouter(interface{})
	StartWorkerLoop(int)
}

type Iserver

type Iserver interface {
	Start()
	Stop()
	Serve()
	GetConnectionMgr() Iconnectionmgr
	GetConnectionQueue() chan interface{}
	AddRouter(router interface{})
	CallLater(durations time.Duration, f func(v ...interface{}), args ...interface{})
	CallWhen(ts string, f func(v ...interface{}), args ...interface{})
	CallLoop(durations time.Duration, f func(v ...interface{}), args ...interface{})
}

Jump to

Keyboard shortcuts

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