Added minor feature request: zts_poll/zts_select
This commit is contained in:
@@ -40,6 +40,7 @@ for applications to use. See also: include/libzt.h */
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#include <poll.h>
|
||||||
|
|
||||||
// stack
|
// stack
|
||||||
#include "pico_stack.h"
|
#include "pico_stack.h"
|
||||||
@@ -1066,14 +1067,12 @@ int zts_close(ZT_CLOSE_SIG)
|
|||||||
|
|
||||||
int zts_poll(ZT_POLL_SIG)
|
int zts_poll(ZT_POLL_SIG)
|
||||||
{
|
{
|
||||||
// struct pollfd *fds, nfds_t nfds, int timeout
|
return poll(fds, nfds, timeout);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int zts_select(ZT_SELECT_SIG)
|
int zts_select(ZT_SELECT_SIG)
|
||||||
{
|
{
|
||||||
// int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout
|
return select(nfds, readfds, writefds, exceptfds, timeout);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int zts_fcntl(ZT_FCNTL_SIG)
|
int zts_fcntl(ZT_FCNTL_SIG)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <poll.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <poll.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -1072,6 +1072,7 @@ int obscure_api_test()
|
|||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
DEBUG_ERROR("error while disabling Nagle's algorithm on socket");
|
DEBUG_ERROR("error while disabling Nagle's algorithm on socket");
|
||||||
}
|
}
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user