transport

package
v0.0.0-...-91c7ab2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientManagement

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

func (*ClientManagement) AddTransport

func (m *ClientManagement) AddTransport(optionType options.OptionType, opts ...options.OptionFunc) (int64, error)

func (*ClientManagement) Close

func (m *ClientManagement) Close()

func (*ClientManagement) DeleteTransport

func (m *ClientManagement) DeleteTransport(id int64) error

func (*ClientManagement) GetTransportState

func (m *ClientManagement) GetTransportState() map[int64]session.State

func (*ClientManagement) OnConnected

func (m *ClientManagement) OnConnected(id int64, ncs string)

func (*ClientManagement) OnConnectionLost

func (m *ClientManagement) OnConnectionLost(id int64, reason error)

OnConnectionLost session因读取/写错误,而断开连接时,会调用该方法

func (*ClientManagement) OnMessage

func (m *ClientManagement) OnMessage(id int64, data interface{}, writer delegate.ResponseWriter)

OnMessage session解析到正确的帧时,会调用该方法

func (*ClientManagement) Send

func (m *ClientManagement) Send(id int64, d interface{}) error

type ServerManagement

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

func (*ServerManagement) AddTransport

func (m *ServerManagement) AddTransport(optionType options.OptionType, opts ...options.OptionFunc) (int64, error)

func (*ServerManagement) Close

func (m *ServerManagement) Close()

func (*ServerManagement) DeleteConnection

func (m *ServerManagement) DeleteConnection(sessionID int64) error

func (*ServerManagement) DeleteTransport

func (m *ServerManagement) DeleteTransport(optsID int64) error

func (*ServerManagement) GetTransportState

func (m *ServerManagement) GetTransportState() map[int64][]int64

func (*ServerManagement) OnConnected

func (m *ServerManagement) OnConnected(id int64, ncs string)

func (*ServerManagement) OnConnectionLost

func (m *ServerManagement) OnConnectionLost(id int64, reason error)

func (*ServerManagement) OnMessage

func (m *ServerManagement) OnMessage(id int64, data interface{}, writer delegate.ResponseWriter)

func (*ServerManagement) Send

func (m *ServerManagement) Send(id int64, d interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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