ws_handlereq

package
v0.0.0-...-e78ad7a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SendBufferSize = 10

	PacketReadTimeoutSec  = 6 * time.Second
	PacketWriteTimeoutSec = 3 * time.Second
)

service const

Variables

View Source
var DemuxReq2BytesAPIFnMap = [...]func(
	me interface{}, hd ws_packet.Header, rbody []byte) (
	ws_packet.Header, interface{}, error){
	ws_idcmd.InvalidCmd: bytesAPIFn_ReqInvalidCmd,
	ws_idcmd.Login:      bytesAPIFn_ReqLogin,
	ws_idcmd.Heartbeat:  bytesAPIFn_ReqHeartbeat,
	ws_idcmd.Chat:       bytesAPIFn_ReqChat,

} // DemuxReq2BytesAPIFnMap

Functions

This section is empty.

Types

type ServeClientConn

type ServeClientConn struct {
	RemoteAddr string
	// contains filtered or unexported fields
}

func NewServeClientConn

func NewServeClientConn(remoteAddr string) *ServeClientConn

func (*ServeClientConn) HandleRecvPacket

func (c2sc *ServeClientConn) HandleRecvPacket(header ws_packet.Header, rbody []byte) error

func (*ServeClientConn) StartServeClientConn

func (c2sc *ServeClientConn) StartServeClientConn(mainctx context.Context, wsConn *websocket.Conn)

func (*ServeClientConn) String

func (c2sc *ServeClientConn) String() string

Jump to

Keyboard shortcuts

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