diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-11-30 22:35:43 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-11-30 22:35:43 +0100 |
commit | 76d6838223718a5432baddb4fa5b3e82440c9ff2 (patch) | |
tree | 87ab207db64dc0d1772d273ffc5749cfe0820581 /include/libssh/priv.h | |
parent | 0bfb9d476c3dfc1ed74763665611891bcc277e9e (diff) | |
download | libssh-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/priv.h')
-rw-r--r-- | include/libssh/priv.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 90c700d5..f96e87c5 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -114,12 +114,6 @@ struct ssh_bind_struct { int toaccept; }; -struct socket; -struct ssh_poll; -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); - SSH_PACKET_CALLBACK(ssh_packet_disconnect_callback); SSH_PACKET_CALLBACK(ssh_packet_ignore_callback); @@ -143,6 +137,8 @@ unsigned char *packet_encrypt(ssh_session session,void *packet,unsigned int len) /* it returns the hmac buffer if exists*/ int packet_hmac_verify(ssh_session session,ssh_buffer buffer,unsigned char *mac); +struct socket; + int ssh_packet_socket_callback(const void *data, size_t len, void *user); void ssh_packet_register_socket_callback(ssh_session session, struct socket *s); void ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callbacks); |