1 #ifndef VSNET_SOCKETSET_H
2 #define VSNET_SOCKETSET_H
31 #include <boost/shared_ptr.hpp>
32 #include <boost/weak_ptr.hpp>
44 namespace VsnetDownload
58 typedef std::set< VsnetSocketBase* >Set;
72 int _blockmain_pending;
73 fd_set _blockmain_set;
77 boost::weak_ptr< VsnetDownload::Client::Manager >_client_mgr;
78 boost::weak_ptr< VsnetDownload::Server::Manager >_server_mgr;
80 public:
SocketSet(
bool blockmainthread =
false );
94 int wait( timeval *tv = NULL );
112 int private_select( timeval *timeout );
113 void private_addset(
int fd, fd_set &fds,
int &maxfd );
114 void private_wakeup();
116 #if defined (VSNET_DEBUG) || defined (__APPLE__)
117 void private_test_dump_active_sets(
int maxfd,
120 fd_set &write_before,
121 fd_set &write_after );
124 void private_test_dump_request_sets( timeval *timeout );
131 std::ostream&
operator<<( std::ostream &ostr,
const timeval &tv );