replace uint8_t with uint64_t for the send/close requests types / use named variable to index into the _fildes array

This commit is contained in:
Benjamin Sergeant
2019-03-14 15:03:57 -07:00
parent 310ab990bd
commit 977b995af9
4 changed files with 25 additions and 17 deletions

View File

@ -23,8 +23,8 @@ namespace ix
{
const int Socket::kDefaultPollNoTimeout = -1; // No poll timeout by default
const int Socket::kDefaultPollTimeout = kDefaultPollNoTimeout;
const uint8_t Socket::kSendRequest = 1;
const uint8_t Socket::kCloseRequest = 2;
const uint64_t Socket::kSendRequest = 1;
const uint64_t Socket::kCloseRequest = 2;
constexpr size_t Socket::kChunkSize;
Socket::Socket(int fd) :
@ -86,7 +86,7 @@ namespace ix
}
else if (eventfd != -1 && FD_ISSET(eventfd, &rfds))
{
uint8_t value = _eventfd.read();
uint64_t value = _eventfd.read();
if (value == kSendRequest)
{