/* 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);
void socket_server::remove_connection_socket(int sock)
{
FD_CLR(sock, &connection_set);
+ sockets_set.erase(sock);
}
/**
}
}
+bool socket_server_connection::fill_buffer(long long usec_timeout,long long* usec_timeout_remaining)
+{
+ bool new_data = socket_handler::fill_buffer(buffer,usec_timeout,usec_timeout_remaining);
+ if (new_data)
+ reset_timeout();
+ return new_data;
+}
}