|
static socket_t | create (const char *address, const char *service, unsigned backlog=5, int family=AF_UNSPEC, int type=0, int protocol=0) |
|
typedef struct hostaddr_internet | host_t |
|
typedef cidr | cidr_t |
|
| Socket () |
|
| Socket (const Socket &existing) |
|
| Socket (socket_t socket) |
|
| Socket (const struct addrinfo *address) |
|
| Socket (int family, int type, int protocol=0) |
|
| Socket (const char *address, const char *port, int family=AF_UNSPEC, int type=0, int protocol=0) |
|
virtual | ~Socket () |
|
void | cancel (void) |
|
void | release (void) |
|
int | err (void) const |
|
bool | is_pending (unsigned value) |
|
bool | connected (void) const |
|
bool | wait (timeout_t timeout=0) const |
|
int | nodelay (void) const |
|
bool | waitSending (timeout_t timeout=0) const |
|
unsigned | pending (void) const |
|
int | broadcast (bool enable) |
|
int | keepalive (bool enable) |
|
int | blocking (bool enable) |
|
int | multicast (unsigned ttl=1) |
|
int | loopback (bool enable) |
|
int | getError (void) const |
|
int | ttl (uint8_t time) |
|
int | sendsize (unsigned size) |
|
int | sendwait (unsigned size) |
|
int | recvsize (unsigned size) |
|
int | type (void) const |
|
unsigned | segsize (unsigned size) |
|
bool | ccid (uint8_t id) |
|
int | tos (int type) |
|
int | priority (int scheduling) |
|
void | shutdown (void) |
|
int | connectto (struct addrinfo *list) |
|
int | disconnect (void) |
|
int | join (const struct addrinfo *list, const int ifindex=0) |
|
int | drop (const struct addrinfo *list, const int ifindex=0) |
|
int | wait (timeout_t timeout=Timer::inf) |
|
size_t | peek (void *data, size_t number) const |
|
size_t | readfrom (void *data, size_t number, struct sockaddr_storage *address=NULL) |
|
size_t | writeto (const void *data, size_t number, const struct sockaddr *address=NULL) |
|
size_t | readline (char *data, size_t size) |
|
size_t | printf (const char *format,...) __PRINTF(2 |
|
size_t size_t | readline (String &buffer) |
|
stringref_t | readline (size_t maxsize) |
|
static ssize_t size_t | writes (const char *string) |
|
| operator bool () const |
|
bool | operator! () const |
|
Socket & | operator= (socket_t socket) |
|
| operator socket_t () const |
|
socket_t | operator* () const |
|
static struct addrinfo * | query (const char *host, const char *service, int type=SOCK_STREAM, int protocol=0) |
|
static void | release (struct addrinfo *list) |
|
static void | cancel (socket_t socket) |
|
static bool | wait (socket_t socket, timeout_t timeout=0) |
|
static int | type (const socket_t socket) |
|
static unsigned | segsize (socket_t socket, unsigned size=0) |
|
static bool | ccid (socket_t socket, uint8_t id) |
|
static ssize_t | readline (socket_t socket, char *data, size_t size, timeout_t timeout=Timer::inf) |
|
static ssize_t | printf (socket_t socket, const char *format,...) __PRINTF(2 |
|
static unsigned | pending (socket_t socket) |
|
static int | sendsize (socket_t socket, unsigned size) |
|
static int | sendwait (socket_t socket, unsigned size) |
|
static int | recvsize (socket_t socket, unsigned size) |
|
static int | connectto (socket_t socket, struct addrinfo *list) |
|
static int | disconnect (socket_t socket) |
|
static int | drop (socket_t socket, const struct addrinfo *list, const int ifindex=0) |
|
static int | join (socket_t socket, const struct addrinfo *list, const int ifindex=0) |
|
static int | error (const socket_t socket) |
|
static int | multicast (socket_t socket, unsigned ttl=1) |
|
static int | loopback (socket_t socket, bool enable) |
|
static int | blocking (socket_t socket, bool enable) |
|
static int | keepalive (socket_t socket, bool enable) |
|
static int | broadcast (socket_t socket, bool enable) |
|
static int | nodelay (socket_t socket) |
|
static int | priority (socket_t socket, int scheduling) |
|
static int | tos (socket_t socket, int type) |
|
static int | ttl (socket_t socket, uint8_t time) |
|
static int | family (socket_t socket) |
|
static int | family (const struct sockaddr_storage &address) |
|
static int | family (const struct sockaddr_internet &address) |
|
static ssize_t | recvfrom (socket_t socket, void *buffer, size_t size, int flags=0, struct sockaddr_storage *address=NULL) |
|
static ssize_t | sendto (socket_t socket, const void *buffer, size_t size, int flags=0, const struct sockaddr *address=NULL) |
|
static ssize_t | replyto (socket_t socket, const void *buffer, size_t size, int flags, const struct sockaddr_storage *address) |
|
static int | bindto (socket_t socket, const char *address, const char *service, int protocol=0) |
|
static int | listento (socket_t socket, const struct sockaddr *address, int backlog=5) |
|
static int | bindto (socket_t socket, const struct sockaddr *address) |
|
static socket_t | acceptfrom (socket_t socket, struct sockaddr_storage *address=NULL) |
|
static socket_t | create (int family, int type, int protocol) |
|
static socket_t | create (const struct addrinfo *address, int type, int protocol) |
|
static socket_t | create (const char *iface, const char *service, int family=AF_UNSPEC, int type=0, int protocol=0) |
|
static socket_t | create (const Socket::address &address) |
|
static void | release (socket_t socket) |
|
static char * | hostname (const struct sockaddr *address, char *buffer, size_t size) |
|
static struct addrinfo * | hinting (socket_t socket, struct addrinfo *hint) |
|
static socklen_t | query (socket_t socket, struct sockaddr_storage *address, const char *hostname, const char *service) |
|
static socklen_t | len (const struct sockaddr *address) |
|
static bool | equal (const struct sockaddr *address1, const struct sockaddr *address2) |
|
static unsigned | copy (struct sockaddr *target, const struct sockaddr *origin) |
|
static unsigned | store (struct sockaddr_storage *storage, const struct sockaddr *address) |
|
static unsigned | store (struct sockaddr_internet *storage, const struct sockaddr *address) |
|
static bool | eq_host (const struct sockaddr *address1, const struct sockaddr *address2) |
|
static bool | eq_from (const struct sockaddr_storage *address1, const struct sockaddr_storage *address2) |
|
static bool | eq_inet (const struct sockaddr_internet *address1, const struct sockaddr_internet *address2) |
|
static bool | eq_subnet (const struct sockaddr *address1, const struct sockaddr *address2) |
|
static int | via (struct sockaddr *address, const struct sockaddr *target, socklen_t size=0) |
|
static char * | query (const struct sockaddr *address, char *buffer, socklen_t size) |
|
static in_port_t | port (const struct sockaddr *address) |
|
static in_port_t | port (const struct sockaddr_internet *address) |
|
static unsigned | keyindex (const struct sockaddr *address, unsigned size) |
|
static unsigned | keyhost (const struct sockaddr *address, unsigned size) |
|
static void | init (void) |
|
static void | query (int family) |
|
static void | v4mapping (bool enable) |
|
static int | error (void) |
|
static bool | is_null (const char *string) |
|
static bool | is_numeric (const char *string) |
|
static int | local (socket_t socket, struct sockaddr_storage *address) |
|
static int | remote (socket_t socket, struct sockaddr_storage *address) |
|
socket_t | so |
|
int | ioerr |
|
timeout_t | iowait |
|
A generic tcp server class. This saves the service id tag so that it can be propagated.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 1900 of file socket.h.