libssh 0.11.1 The SSH library

Loading...
Searching...
No Matches
Enumerations | Functions
The SSH socket functions.
The libssh API

## Enumerations
enum | ssh_socket_states_e

## Functions
int | ssh_socket_init (void)
void | ssh_socket_cleanup (void)
| Cleanup the socket system.
ssh_socket | ssh_socket_new (ssh_session session)
void | ssh_socket_reset (ssh_socket s)
void | ssh_socket_set_callbacks (ssh_socket s, ssh_socket_callbacks callbacks)
void | ssh_socket_set_connected (ssh_socket s, struct ssh_poll_handle_struct *p)
int | ssh_socket_pollcallback (struct ssh_poll_handle_struct *p, socket_t fd, int revents, void *v_s)
| SSH poll callback. This callback will be used when an event caught on the socket.
ssh_poll_handle | ssh_socket_get_poll_handle (ssh_socket s)
void | ssh_socket_free (ssh_socket s)
int | ssh_socket_unix (ssh_socket s, const char *path)
void | ssh_socket_close (ssh_socket s)
void | ssh_socket_set_fd (ssh_socket s, socket_t fd)
socket_t | ssh_socket_get_fd (ssh_socket s)
int | ssh_socket_is_open (ssh_socket s)
int | ssh_socket_fd_isset (ssh_socket s, fd_set *set)
void | ssh_socket_fd_set (ssh_socket s, fd_set *set, socket_t *max_fd)
int | ssh_socket_write (ssh_socket s, const void *buffer, uint32_t len)
int | ssh_socket_nonblocking_flush (ssh_socket s)
void | ssh_socket_set_write_wontblock (ssh_socket s)
void | ssh_socket_set_read_wontblock (ssh_socket s)
void | ssh_socket_set_except (ssh_socket s)
int | ssh_socket_data_available (ssh_socket s)
int | ssh_socket_data_writable (ssh_socket s)
int | ssh_socket_buffered_write_bytes (ssh_socket s)
int | ssh_socket_get_status (ssh_socket s)
int | ssh_socket_get_poll_flags (ssh_socket s)
int | ssh_socket_set_nonblocking (socket_t fd)
int | ssh_socket_set_blocking (socket_t fd)
int | ssh_socket_connect (ssh_socket s, const char *host, uint16_t port, const char *bind_addr)

## Detailed Description

Functions for handling sockets.

## Function Documentation

## ◆ ssh_socket_pollcallback()

int ssh_socket_pollcallback | ( | struct ssh_poll_handle_struct * | p,
|  | socket_t | fd,
|  | int | revents,
|  | void * | v_s )

SSH poll callback. This callback will be used when an event caught on the socket.

Parameters

  p | Poll object this callback belongs to.
  fd | The raw socket.
  revents | The current poll events on the socket.
  v_s | Userdata to be passed to the callback function, in this case the socket object.

Returns
  0 on success, < 0 when the poll object has been removed from its poll context.