IConnManager Connection Management Abstract Layer
| 5 | |
| 6 | // IConnManager Connection Management Abstract Layer |
| 7 | type IConnManager interface { |
| 8 | Add(IConnection) // Add connection |
| 9 | Remove(IConnection) // Remove connection |
| 10 | Get(uint64) (IConnection, error) // Get a connection by ConnID |
| 11 | Get2(string) (IConnection, error) // Get a connection by string ConnID |
| 12 | Len() int // Get current number of connections |
| 13 | ClearConn() // Remove and stop all connections |
| 14 | GetAllConnID() []uint64 // Get all connection IDs |
| 15 | GetAllConnIdStr() []string // Get all string connection IDs |
| 16 | Range(func(uint64, IConnection, interface{}) error, interface{}) error // Traverse all connections |
| 17 | Range2(func(string, IConnection, interface{}) error, interface{}) error // Traverse all connections 2 |
| 18 | } |
no outgoing calls
no test coverage detected