summaryrefslogtreecommitdiffstats
path: root/include/libssh/socket.h
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-11-30 22:35:43 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-11-30 22:35:43 +0100
commit76d6838223718a5432baddb4fa5b3e82440c9ff2 (patch)
tree87ab207db64dc0d1772d273ffc5749cfe0820581 /include/libssh/socket.h
parent0bfb9d476c3dfc1ed74763665611891bcc277e9e (diff)
downloadlibssh-76d6838223718a5432baddb4fa5b3e82440c9ff2.tar.gz
libssh-76d6838223718a5432baddb4fa5b3e82440c9ff2.tar.xz
libssh-76d6838223718a5432baddb4fa5b3e82440c9ff2.zip
Some brain surgery to add event-based sockets
chapter 1- SSH Socket Connections. I would like to be able to -Have a ssh_poll_ctx object -Add a ssh socket over it -launch the socket connection (using socket functions) -ssh_poll_ctx_dopoll() -Wait for the timeout or have the "connected" callback called
Diffstat (limited to 'include/libssh/socket.h')
-rw-r--r--include/libssh/socket.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libssh/socket.h b/include/libssh/socket.h
index bb54c7e..858c5d8 100644
--- a/include/libssh/socket.h
+++ b/include/libssh/socket.h
@@ -22,6 +22,8 @@
#ifndef SOCKET_H_
#define SOCKET_H_
+#include "libssh/callbacks.h"
+struct ssh_poll_handle_struct;
/* socket.c */
struct socket;
@@ -52,4 +54,9 @@ int ssh_socket_get_status(struct socket *s);
int ssh_socket_data_available(struct socket *s);
int ssh_socket_data_writable(struct socket *s);
+void ssh_socket_set_callbacks(struct socket *s, ssh_socket_callbacks callbacks);
+int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, int fd, int revents, void *s);
+void ssh_socket_register_pollcallback(struct socket *s, struct ssh_poll_handle_struct *p);
+struct ssh_poll_handle_struct * ssh_socket_get_poll_handle(struct socket *s);
+
#endif /* SOCKET_H_ */