23 #include <netlink/socket_group.h>
35 inline void SocketGroup::add(
Socket* socket) {
37 _vSocket.push_back(socket);
49 inline Socket* SocketGroup::get(
unsigned index)
const {
51 if(index >= _vSocket.size())
52 throw Exception(Exception::OUT_OF_RANGE,
"SocketGroup::get: index out of range");
54 return _vSocket[index];
65 inline void SocketGroup::remove(
unsigned index) {
67 if(index >= _vSocket.size())
68 throw Exception(Exception::OUT_OF_RANGE,
"SocketGroup::remove: index out of range");
70 _vSocket.erase(_vSocket.begin() + index);
79 inline size_t SocketGroup::size()
const {
81 return _vSocket.size();
121 _cmdOnDisconnect = cmd;