()
| 25 | } |
| 26 | |
| 27 | func NewClientConnLimiter() *ClientConnLimiter { |
| 28 | return &ClientConnLimiter{ |
| 29 | remoteAddrMap: map[string]*ClientConnRemoteAddr{}, |
| 30 | ipConns: map[string]map[string]zero.Zero{}, |
| 31 | serverConns: map[int64]map[string]zero.Zero{}, |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // Add 添加新连接 |
| 36 | // 返回值为true的时候表示允许添加;否则表示不允许添加 |
no outgoing calls