небольшая чистка и улучшение кода, попытка исправить picloud

This commit is contained in:
Бычков Андрей
2022-11-07 17:16:27 +03:00
parent 8a5e72c723
commit f08a07cab0
11 changed files with 54 additions and 79 deletions

View File

@@ -37,22 +37,23 @@ public:
void create();
void destroy();
#ifdef WINDOWS
bool wait();
#else
enum SelectRole {
enum CheckRole { // UNIX only
CheckRead,
CheckWrite
CheckWrite,
CheckExeption
};
bool wait(int fd, SelectRole role = CheckRead);
#endif
bool wait(int fd = -1, CheckRole role = CheckRead);
void interrupt();
bool isCreate() const;
#ifdef WINDOWS
HANDLE event = NULL;
#else
void * getEvent() const; // WINDOWS only
private:
#ifdef WINDOWS
void * event = nullptr;
#else
int pipe_fd[2] = {0, 0};
fd_set fds[3];
enum {