Conversion to listless socket management.
This commit is contained in:
1 parent
796ddd511f
commit
cb7a556edf
5 files changed
+37
-80
No files matched your search
@@ -101,7 +101,7 @@ namespace core {
|
||||
/// Receive the epoll events and dispatch the event to the socket making the request.
|
||||
///
|
||||
|
||||
void eventReceived(struct epoll_event event, pid_t threadId); ///< Dispatch event to appropriate socket.
|
||||
void eventReceived(struct epoll_event event); ///< Dispatch event to appropriate socket.
|
||||
|
||||
///
|
||||
/// The processCommand() method displays the thread array to the requesting console via the
|
||||
@@ -112,17 +112,14 @@ namespace core {
|
||||
|
||||
int processCommand(std::string command, TCPSession *session, std::stringstream &data) override; ///<Output the threads array to the console.
|
||||
|
||||
void resetRead(Socket *socket);
|
||||
void resetWrite(Socket *socket);
|
||||
void resetSocket(Socket *socket);
|
||||
|
||||
private:
|
||||
|
||||
int epfd;
|
||||
int numberOfThreads;
|
||||
std::map<int, Socket *> sockets;
|
||||
std::vector<Thread> threads;
|
||||
volatile bool terminateThreads;
|
||||
std::mutex lock;
|
||||
void enableSocket(Socket *socket);
|
||||
void disableSocket(Socket *socket);
|
||||
|
||||
|
||||
Reference in new issue
Block a user