@@ -422,18 +422,20 @@ class webserver
422422 void send_message_to_topic (const std::string& topic,
423423 const std::string& message
424424 );
425- void send_message_to_consumer (int connection_id,
425+ void send_message_to_consumer (const httpserver_ska& connection_id,
426426 const std::string& message, bool to_lock = true
427427 );
428428 void register_to_topics (const std::vector<std::string>& topics,
429- int connection_id, int keepalive_secs = -1 ,
429+ const httpserver_ska& connection_id, int keepalive_secs = -1 ,
430430 std::string keepalive_msg = " "
431431 );
432- size_t read_message (int connection_id, std::string& message);
432+ size_t read_message (const httpserver_ska& connection_id,
433+ std::string& message
434+ );
433435 size_t get_topic_consumers (const std::string& topic,
434- std::set<int >& consumers
436+ std::set<httpserver_ska >& consumers
435437 );
436- bool pop_signaled (int consumer);
438+ bool pop_signaled (const httpserver_ska& consumer);
437439
438440 http_response* get_from_cache (const std::string& key, bool * valid,
439441 bool lock = false , bool write = false
@@ -569,12 +571,12 @@ class webserver
569571 std::set<ip_representation> allowances;
570572#endif
571573
572- std::map<int , std::deque<std::string> > q_messages;
573- std::map<std::string, std::set<int > > q_waitings;
574- std::map<int , std::pair<pthread_mutex_t , pthread_cond_t > > q_blocks;
575- std::set<int > q_signal;
576- std::map<int , long > q_keepalives;
577- std::map<int , std::pair<int , std::string> > q_keepalives_mem;
574+ std::map<httpserver_ska , std::deque<std::string> > q_messages;
575+ std::map<std::string, std::set<httpserver_ska > > q_waitings;
576+ std::map<httpserver_ska , std::pair<pthread_mutex_t , pthread_cond_t > > q_blocks;
577+ std::set<httpserver_ska > q_signal;
578+ std::map<httpserver_ska , long > q_keepalives;
579+ std::map<httpserver_ska , std::pair<int , std::string> > q_keepalives_mem;
578580 pthread_rwlock_t comet_guard;
579581
580582 std::vector<details::daemon_item*> daemons;
@@ -586,9 +588,7 @@ class webserver
586588
587589 void init (render_ptr single_resource);
588590 static void * select (void * self);
589- // void schedule_fd(int fd, fd_set* schedule_list, int* max);
590591 static void * cleaner (void * self);
591- void clean_connections ();
592592
593593 void register_resource (const std::string& resource,
594594 details::http_resource_mirror hrm, bool family = false
0 commit comments