#include <SocketFactory.h>
Data Fields | |
| int(* | create )(void *_status, int family, int type, int protocol) |
| create the socket attached to the SocketFactory instance | |
| int(* | bind )(void *_status, struct sockaddr *addr, socklen_t *addrlen) |
| binds the socket to the given address (expected: AF_INET family) or performs autobind (AF_PADICO family + 'AUTO' magic number). | |
| int(* | listen )(void *_status, int backlog, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_acceptor_t notifier, void *key) |
| listens incoming connections on the socket | |
| int(* | connect )(void *_status, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_connector_t notifier, void *key) |
| connects the socket to the given address | |
| int(* | close )(void *_status) |
| closes the given socket | |
| int(* | setsockopt )(void *_status, int level, int opt, const void *val, int len) |
| sets socket options (if appropriate for component). | |
| unsigned | caps |
| socket capabilities ( | |
Detailed Description
Definition at line 36 of file SocketFactory.h.
Field Documentation
◆ bind
binds the socket to the given address (expected: AF_INET family) or performs autobind (AF_PADICO family + 'AUTO' magic number).
Socket factories are not required to support all address families.
- Returns
- 0 if success, -errno in case of error.
- Note
- 'addr' and 'addrlen' are filled-in with the address.
Definition at line 48 of file SocketFactory.h.
Referenced by psp_sf_connect(), sfrfw_connect(), sysio_control_bootstrap_server(), and vlink_sf_bind().
◆ caps
| unsigned padico_socketfactory_s::caps |
socket capabilities (
- See also
- enum padico_vsock_capabilities_e)
Definition at line 74 of file SocketFactory.h.
Referenced by vlink_sf_create().
◆ close
closes the given socket
Definition at line 68 of file SocketFactory.h.
Referenced by sfrfw_client_acceptor(), sfrfw_gateway_close(), socks4client_close(), sysio_control_socket_close(), and vlink_sf_close().
◆ connect
| int(* padico_socketfactory_s::connect) (void *_status, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_connector_t notifier, void *key) |
connects the socket to the given address
- Returns
- 0 if success, -errno in case of error.
- Parameters
-
addr address of the server. notifier notification function called upon connection completion key key given to the notifier
Definition at line 64 of file SocketFactory.h.
Referenced by psp_sf_connect(), sfrfw_gateway_connect_client(), sfrfw_gateway_connect_server_end_handler(), socks4client_create(), sysio_control_socket_connect(), and vlink_sf_connect().
◆ create
create the socket attached to the SocketFactory instance
- Returns
- 0 if success, -errno in case of error.
Definition at line 41 of file SocketFactory.h.
Referenced by psp_sf_init(), sfrfw_connect(), sfrfw_gateway_connect_client(), sfrfw_gateway_connect_server_end_handler(), socks4client_create(), sysio_control_socket_create(), and vlink_sf_create().
◆ listen
| int(* padico_socketfactory_s::listen) (void *_status, int backlog, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_acceptor_t notifier, void *key) |
listens incoming connections on the socket
- Returns
- 0 if success, -errno in case of error.
- Parameters
-
addr address of the expected client (when used as secondary component).
- Note
- when addr is non-NULL (==>secondary), 'backlog' is ignored.
- Parameters
-
notifier notification function called upon connection completion key key given to the notifier
Definition at line 56 of file SocketFactory.h.
Referenced by psp_sf_connect(), sfrfw_connect(), sysio_control_bootstrap_server(), and vlink_sf_listen().
◆ setsockopt
| int(* padico_socketfactory_s::setsockopt) (void *_status, int level, int opt, const void *val, int len) |
sets socket options (if appropriate for component).
Definition at line 71 of file SocketFactory.h.
Referenced by sysio_control_bootstrap_server().
The documentation for this struct was generated from the following file: