summaryrefslogtreecommitdiffstats
path: root/include/libssh/priv.h
diff options
context:
space:
mode:
authorAleksandar Kanchev <aleksandar.kanchev@googlemail.com>2009-06-24 16:44:31 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-07-03 21:53:53 +0200
commit3659e8c04ac1684fa73aecc7005c2e6da9f53c3e (patch)
treee734125ea3c520c823e3d216d0120ff11fe5f36f /include/libssh/priv.h
parentc4cf349729899b666b97728c3c66d31b2f4de4e6 (diff)
downloadlibssh-3659e8c04ac1684fa73aecc7005c2e6da9f53c3e.tar.gz
libssh-3659e8c04ac1684fa73aecc7005c2e6da9f53c3e.tar.xz
libssh-3659e8c04ac1684fa73aecc7005c2e6da9f53c3e.zip
Add a generic way to handle sockets asynchronously.
It's based on poll objects, each of which store a socket, it's events and a callback, which gets called whenever an event is set. The poll objects are attached to a poll context, which should be allocated on per thread basis. Polling the poll context will poll all the attached poll objects and call their callbacks (handlers) if any of the socket events are set. This should be done within the main loop of an application. This is intended as a ground work for making libssh asynchronous. Signed-off-by: Aleksandar Kanchev <aleksandar.kanchev@googlemail.com>
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r--include/libssh/priv.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 4c380deb..41ee58b6 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -144,14 +144,6 @@ typedef struct pollfd_s {
short revents; /* returned events */
} pollfd_t;
-#define POLLIN 0x001 /* There is data to read. */
-#define POLLPRI 0x002 /* There is urgent data to read. */
-#define POLLOUT 0x004 /* Writing now will not block. */
-
-#define POLLERR 0x008 /* Error condition. */
-#define POLLHUP 0x010 /* Hung up. */
-#define POLLNVAL 0x020 /* Invalid polling request. */
-
typedef unsigned long int nfds_t;
#endif /* HAVE_POLL */