Created
May 10, 2015 08:32
-
-
Save yxbh/4c8ff1bd1e33cc45b959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum CollectorStatus { Idle, Working } | |
class Analyst | |
{ | |
private: | |
int m_handle; | |
Status m_status; | |
} | |
class Collector | |
{ | |
int m_handle | |
} | |
std::vector<Sockets> m_collectors | |
std::vector<Analyst> | |
Socket new_socket; | |
for (;;) | |
{ | |
// accepting new analyst | |
new_socket = accept(/...//) | |
if (new_socket is valid) | |
{ | |
m_collectors.push_back(new_socket); | |
} | |
// accepting collectors | |
new_socket = accept(/...//) | |
if (new_socket is valid) | |
{ | |
m_collectors.push_back(new_socket); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment