【文件属性】:
文件名称:dnet:tcp,websocket库
文件大小:44KB
文件格式:ZIP
更新时间:2021-04-09 10:53:10
go socket tcp websocket net
dnet
一个简单的tcp , websocket的封装
会议
type Session interface {
// connection
NetConn() interface{}
// RemoteAddr returns the remote network address.
RemoteAddr() net.Addr
// LocalAddr returns the local network address.
LocalAddr() net.Addr
// Send data will be encoded by the encoder and sent
Send(o interface{}) error
// SetContext binding session data
SetContext(ctx interface{})
//
【文件预览】:
dnet-master
----option.go(2KB)
----ws_conn.go(3KB)
----daio()
--------service.go(3KB)
--------poller()
--------listener.go(2KB)
--------conn.go(5KB)
--------conn_test.go(3KB)
----ws_session.go(1KB)
----session.go(4KB)
----tcp_session.go(2KB)
----tcp_acceptor_test.go(996B)
----dkcp()
--------kcp.go(1KB)
--------kcp_test.go(2KB)
--------kcpsock.go(6KB)
----tcp_session_test.go(3KB)
----net.go(2KB)
----examples()
--------helper.go(590B)
--------module()
--------cs()
--------rpc()
--------pb()
----drpc()
--------message.go(307B)
--------server.go(2KB)
--------client.go(2KB)
----ws_acceptor.go(2KB)
----tcp_acceptor.go(2KB)
----dhttp()
--------hclient.go(6KB)
--------hserver_test.go(597B)
--------hserver.go(4KB)
--------hclient_test.go(970B)
----ws_session_test.go(2KB)
----README.md(6KB)