Hash 工作模式下,需要等待接受到client1的pong后,才会收到client2和client3的pong DynamicBind工作模式下,client2, client3 都会立马收到pong, 但client1的pong会被阻塞十秒后才收到
(request ziface.IRequest)
| 24 | // Hash 工作模式下,需要等待接受到client1的pong后,才会收到client2和client3的pong |
| 25 | // DynamicBind工作模式下,client2, client3 都会立马收到pong, 但client1的pong会被阻塞十秒后才收到 |
| 26 | func (p *PongRouter) Handle(request ziface.IRequest) { |
| 27 | //read server pong data |
| 28 | zlog.Infof("---------client:%s, recv from server:%s, msgId=%d, data=%s ----------\n", |
| 29 | p.client, request.GetConnection().RemoteAddr(), request.GetMsgID(), string(request.GetData())) |
| 30 | } |
| 31 | |
| 32 | func onClient1Start(conn ziface.IConnection) { |
| 33 | zlog.Infof("client1 connection start, %s->%s\n", conn.LocalAddrString(), conn.RemoteAddrString()) |
nothing calls this directly
no test coverage detected