websocket

package
v0.0.0-...-d272d5c Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoConn

func DoConn(conn *conn.Conn)

DoConn 处理连接

func GetStackInfo

func GetStackInfo() string

GetStackInfo 获取Panic堆栈信息

func HandleReadErr

func HandleReadErr(conn *conn.Conn, err error)

HandleReadErr 读取conn错误

func RecoverPanic

func RecoverPanic()

RecoverPanic 恢复panic

Types

type TcpHandler

type TcpHandler struct{}

func (*TcpHandler) OnConnect

func (*TcpHandler) OnConnect(c *gn.Conn)

type Transpore

type Transpore struct{}

func (Transpore) Endpoint

func (Transpore) Endpoint() string

func (Transpore) Kind

func (Transpore) Kind() transport.Kind

func (Transpore) Operation

func (Transpore) Operation() string

func (Transpore) ReplyHeader

func (Transpore) ReplyHeader() transport.Header

func (Transpore) RequestHeader

func (Transpore) RequestHeader() transport.Header

type WebSocketServer

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

func NewServer

func NewServer(s *service.ShopAdmin) *WebSocketServer

func (*WebSocketServer) Endpoint

func (s *WebSocketServer) Endpoint() (*url.URL, error)

func (*WebSocketServer) Start

func (s *WebSocketServer) Start(ctx context.Context) error

func (*WebSocketServer) Stop

func (s *WebSocketServer) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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