Documentation ¶
Index ¶
- func Bind(serverId int32, ip string, port int, socketType define.SocketType, ...) (ask.IAsker, error)
- func CheckWorks(msg string, root *base.Work)
- func Disconnect(port int32, cid int32) error
- func GetFrameTime() time.Duration
- func Listen(socketType define.SocketType, port int32) (ans.IAnswer, error)
- func Run(run func())
- func RunAns()
- func RunAsk()
- func SendRequest(req *ghttp.Request, callback func(*ghttp.Context)) (int32, error)
- func SendToClient(port int32, cid int32, data *[]byte, length int32) error
- func SendToServer(serverId int32, data *[]byte, length int32) error
- func SendTransDataToServer(serverId int32, td *base.TransData) error
- func SetFrameTime(frameTime time.Duration)
- func SetLogger(lg *glog.Logger)
- func StartConnect() error
- func StartListen()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind(serverId int32, ip string, port int, socketType define.SocketType, onEvents base.OnEventsFunc, introduction *[]byte, heartbeat *[]byte) (ask.IAsker, error)
向位置 ip:port 送出連線請求,利用 serverId 來識別多個連線 serverId: server id ip: server ip port: server port socketType: 協定類型
func CheckWorks ¶
func Disconnect ¶ added in v1.4.0
func GetFrameTime ¶ added in v1.4.0
func SendRequest ¶ added in v1.1.0
傳送 http 訊息
func SendTransDataToServer ¶ added in v1.2.3
func SetFrameTime ¶ added in v1.4.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.