Documentation ¶
Index ¶
- Constants
- Variables
- func AddClient(serverName, addr string)
- func AsynCall(serverName string, chanAsynRet chan *chanrpc.RetInfo, id interface{}, ...)
- func Broadcast(serverType string, id interface{}, args ...interface{})
- func Call0(serverName string, id interface{}, args ...interface{}) error
- func Call1(serverName string, id interface{}, args ...interface{}) (interface{}, error)
- func CallN(serverName string, id interface{}, args ...interface{}) ([]interface{}, error)
- func Destroy()
- func GetRequestCount() int
- func Go(serverName string, id interface{}, args ...interface{})
- func Init()
- func RemoveClient(serverName string)
- func SetRoute(id interface{}, server *chanrpc.Server)
- type Agent
- func (a *Agent) AsynCall(chanAsynRet chan *chanrpc.RetInfo, id interface{}, args ...interface{})
- func (a *Agent) Call0(id interface{}, args ...interface{}) error
- func (a *Agent) Call1(id interface{}, args ...interface{}) (interface{}, error)
- func (a *Agent) CallN(id interface{}, args ...interface{}) ([]interface{}, error)
- func (a *Agent) Close()
- func (a *Agent) Destroy()
- func (a *Agent) GetRequestCount() int
- func (a *Agent) Go(id interface{}, args ...interface{})
- func (a *Agent) LocalAddr() net.Addr
- func (a *Agent) OnClose()
- func (a *Agent) RemoteAddr() net.Addr
- func (a *Agent) Run()
- func (a *Agent) SetUserData(data interface{})
- func (a *Agent) UserData() interface{}
- func (a *Agent) WriteMsg(msg interface{})
- type RequestInfo
- type S2S_HeartBeat
- type S2S_NotifyServerName
- type S2S_RequestMsg
- type S2S_ResponseMsg
Constants ¶
View Source
const (
NeedWaitRequestTimes = 5
)
Variables ¶
View Source
var (
AgentChanRPC *chanrpc.Server
)
View Source
var (
Processor = lgob.NewProcessor()
)
Functions ¶
func GetRequestCount ¶
func GetRequestCount() int
func RemoveClient ¶
func RemoveClient(serverName string)
Types ¶
type Agent ¶
func (*Agent) GetRequestCount ¶
func (*Agent) RemoteAddr ¶
func (*Agent) SetUserData ¶
func (a *Agent) SetUserData(data interface{})
type RequestInfo ¶
type RequestInfo struct {
// contains filtered or unexported fields
}
type S2S_HeartBeat ¶
type S2S_HeartBeat struct { }
type S2S_NotifyServerName ¶
type S2S_NotifyServerName struct {
ServerName string
}
type S2S_RequestMsg ¶
type S2S_ResponseMsg ¶
Click to show internal directories.
Click to hide internal directories.