serv

package
v0.0.0-...-93c743e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTcpDialer

func NewTcpDialer(serviceId string) him.Dialer

Types

type Handler

type Handler struct {
	ServiceId string
	AppSecret string
}

func (*Handler) Accept

func (h *Handler) Accept(conn him.Conn, timeout time.Duration) (string, error)

func (*Handler) Disconnect

func (h *Handler) Disconnect(id string) error

func (*Handler) Receive

func (h *Handler) Receive(agent him.Agent, payload []byte)

Receive 接收SDK发送来的消息

type TcpDialer

type TcpDialer struct {
	ServiceId string
}

func (*TcpDialer) DialAndHandshake

func (t *TcpDialer) DialAndHandshake(ctx him.DialerContext) (net.Conn, error)

DialAndHandshake 与chat建立tcp连接

Jump to

Keyboard shortcuts

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