gateapi

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastAll

func BroadcastAll(msg interface{})

广播给所有客户端

func CloseAllClient

func CloseAllClient()

关闭所有网关上客户端的连接

func Send

func Send(tag *fx.ClientTag, msg interface{})

给客户端发消息

Types

type ClientList

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

func NewClientList

func NewClientList() *ClientList

创建一个客户端列表

func (*ClientList) AddClient

func (this *ClientList) AddClient(tag *fx.ClientTag)

添加客户端

func (*ClientList) Broadcast

func (this *ClientList) Broadcast(msg interface{})

将消息广播给列表中的客户端

func (*ClientList) CloseClient

func (this *ClientList) CloseClient()

关闭列表中客户端的连接

Jump to

Keyboard shortcuts

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