1.优化网络模块

2.新增kcp模块
This commit is contained in:
duanhf2012
2024-09-30 14:31:24 +08:00
parent 39116c4402
commit b943ea9a83
20 changed files with 656 additions and 214 deletions

View File

@@ -29,7 +29,7 @@ type IWriter interface {
}
type IRealClient interface {
SetConn(conn *network.TCPConn)
SetConn(conn *network.NetConn)
Close(waitDone bool)
AsyncCall(NodeId string, timeout time.Duration, rpcHandler IRpcHandler, serviceMethod string, callback reflect.Value, args interface{}, replyParam interface{}, cancelable bool) (CancelRpc, error)
@@ -52,7 +52,7 @@ type Client struct {
IRealClient
}
func (client *Client) NewClientAgent(conn *network.TCPConn) network.Agent {
func (client *Client) NewClientAgent(conn *network.NetConn) network.Agent {
client.SetConn(conn)
return client