diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2017-02-15 21:38:31 +0200 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2017-02-15 21:38:31 +0200 |
| commit | e41108fe4f40113f51e7b873f5165ebaf2b085d1 (patch) | |
| tree | 76fb4d7f994f32d3fda1cb8903fe2065f7b9fd86 /src/socket.h | |
| parent | a2c431ec96f7a6ed7e5c41b7ae93dc086ae541f1 (diff) | |
| download | mqtt-e41108fe4f40113f51e7b873f5165ebaf2b085d1.tar.gz mqtt-e41108fe4f40113f51e7b873f5165ebaf2b085d1.zip | |
Add SocketSelect() to wrap select()
This also makes all the necessary includes for sockets centralized to
`sockets.c`.
Diffstat (limited to 'src/socket.h')
| -rw-r--r-- | src/socket.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket.h b/src/socket.h index ba90843..0b9b099 100644 --- a/src/socket.h +++ b/src/socket.h @@ -11,4 +11,12 @@ int SocketDisconnect(int sock); int SocketSendAll(int sock, const char *buf, size_t *len); +enum +{ + EV_READ = 1, + EV_WRITE = 2 +}; + +int SocketSelect(int sock, int *events, int timeout); + #endif |
