Socket::Poll does not need a callback

This commit is contained in:
Benjamin Sergeant
2019-04-18 16:42:44 -07:00
parent aea859af52
commit 03f762db86
3 changed files with 87 additions and 77 deletions

View File

@ -37,8 +37,6 @@ namespace ix
class Socket {
public:
using OnPollCallback = std::function<void(PollResultType)>;
Socket(int fd = -1);
virtual ~Socket();
bool init(std::string& errorMsg);
@ -46,8 +44,7 @@ namespace ix
void configure();
// Functions to check whether there is activity on the socket
void poll(const OnPollCallback& onPollCallback,
int timeoutSecs = kDefaultPollTimeout);
PollResultType poll(int timeoutSecs = kDefaultPollTimeout);
bool wakeUpFromPoll(uint8_t wakeUpCode);
PollResultType isReadyToWrite(int timeoutMs);