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
Click to show internal directories.
Click to hide internal directories.