socket

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func InitConnection

func InitConnection(wsConn *websocket.Conn) (conn *Connection, err error)

初始化长连接

func (*Connection) Close

func (conn *Connection) Close()

关闭连接的Api

func (*Connection) ReadMessage

func (conn *Connection) ReadMessage() (data []byte, err error)

读取Api

func (*Connection) WriteMessage

func (conn *Connection) WriteMessage(data []byte) (err error)

发送Api

Jump to

Keyboard shortcuts

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