mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
1.新增yml文件支持
2.优化网络模块日志 3.新增类型转换函数
This commit is contained in:
@@ -161,7 +161,7 @@ func (tm *TcpModule) SendMsg(clientId string, msg interface{}) error {
|
||||
client, ok := tm.mapClient[clientId]
|
||||
if ok == false {
|
||||
tm.mapClientLocker.Unlock()
|
||||
return fmt.Errorf("client %d is disconnect!", clientId)
|
||||
return fmt.Errorf("client %s is disconnect", clientId)
|
||||
}
|
||||
|
||||
tm.mapClientLocker.Unlock()
|
||||
|
||||
@@ -80,8 +80,7 @@ func (ws *WSModule) Init(wsCfg *WSCfg, process processor.IRawProcessor) {
|
||||
}
|
||||
|
||||
func (ws *WSModule) Start() error {
|
||||
ws.wsServer.Start()
|
||||
return nil
|
||||
return ws.wsServer.Start()
|
||||
}
|
||||
|
||||
func (ws *WSModule) wsEventHandler(ev event.IEvent) {
|
||||
@@ -98,7 +97,7 @@ func (ws *WSModule) wsEventHandler(ev event.IEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
func (ws *WSModule) recyclerReaderBytes(data []byte) {
|
||||
func (ws *WSModule) recyclerReaderBytes([]byte) {
|
||||
}
|
||||
|
||||
func (ws *WSModule) NewWSClient(conn *network.WSConn) network.Agent {
|
||||
@@ -177,7 +176,7 @@ func (ws *WSModule) SendMsg(clientId string, msg interface{}) error {
|
||||
client, ok := ws.mapClient[clientId]
|
||||
if ok == false {
|
||||
ws.mapClientLocker.Unlock()
|
||||
return fmt.Errorf("client %s is disconnect!", clientId)
|
||||
return fmt.Errorf("client %s is disconnect", clientId)
|
||||
}
|
||||
|
||||
ws.mapClientLocker.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user