im_server

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(id string, addr string, port int) (gate.Server, error)

Types

type GatewayServer

type GatewayServer struct {
	*gateway.Impl
	// contains filtered or unexported fields
}

func (*GatewayServer) HandleConnection

func (c *GatewayServer) HandleConnection(conn conn.Connection) gate.ID

HandleConnection 当一个用户连接建立后, 由该方法创建 Client 实例 Client 并管理该连接, 返回该由连接创建客户端的标识 id 返回的标识 id 是一个临时 id, 后续连接认证后会改变

func (*GatewayServer) Run

func (c *GatewayServer) Run() error

func (*GatewayServer) SetMessageHandler

func (c *GatewayServer) SetMessageHandler(h gate.MessageHandler)

Jump to

Keyboard shortcuts

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