#include <sys/socket.h>
#include <sys/un.h>
#include <sys/time.h>
+#include <sys/stat.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
/* clear & insert server sock into the fd_tab to prepare select */
FD_ZERO(&connection_set);
FD_SET (sock, &connection_set);
+ sockets_set.insert(sock);
}
/// handle a new connection from a client
}
FD_SET (newsock, &connection_set);
+ sockets_set.insert(newsock);
socket_server_connection *nc=new socket_server_connection(newsock, get_type(), get_default_timeout());
nc->set_socket_options(newsock);
}
catch (t2n_transfer_error &e)
{ i->second->close(); }
- catch(...)
- { throw; }
}
return data_found;
void socket_server::remove_connection_socket(int sock)
{
FD_CLR(sock, &connection_set);
+ sockets_set.erase(sock);
}
/**