30 #ifndef __ZMQ_SELECT_HPP_INCLUDED__ 31 #define __ZMQ_SELECT_HPP_INCLUDED__ 35 #if defined ZMQ_USE_SELECT 37 #include "platform.hpp" 43 #if defined ZMQ_HAVE_WINDOWS 45 #elif defined ZMQ_HAVE_OPENVMS 46 #include <sys/types.h> 49 #include <sys/select.h> 65 class select_t :
public poller_base_t
69 typedef fd_t handle_t;
71 select_t (
const ctx_t &ctx_);
76 void rm_fd (handle_t handle_);
77 void set_pollin (handle_t handle_);
78 void reset_pollin (handle_t handle_);
79 void set_pollout (handle_t handle_);
80 void reset_pollout (handle_t handle_);
84 static int max_fds ();
89 static void worker_routine (
void *arg_);
101 fds_set_t (
const fds_set_t& other_);
102 fds_set_t& operator=(
const fds_set_t& other_);
104 void remove_fd (
const fd_t& fd_);
116 typedef std::vector<fd_entry_t> fd_entries_t;
118 #if defined ZMQ_HAVE_WINDOWS 119 struct family_entry_t
123 fd_entries_t fd_entries;
127 typedef std::map<u_short, family_entry_t> family_entries_t;
139 #if defined ZMQ_HAVE_WINDOWS 140 family_entries_t family_entries;
142 family_entries_t::iterator current_family_entry_it;
144 fd_entries_t fd_entries;
150 #if defined ZMQ_HAVE_WINDOWS 152 static u_short get_fd_family (
fd_t fd_);
155 static bool is_retired_fd (
const fd_entry_t &entry);
163 select_t (
const select_t&);
164 const select_t &operator = (
const select_t&);
167 typedef select_t poller_t;
static void worker(void *s)