sock.h File Reference
Network Socket Library
`#include "UpnpGlobal.h"`
`#include "UpnpInet.h"`
`#include "autoconfig.h"`
Include dependency graph for sock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | SOCKINFO

## Macros

#define | SD_RECEIVE 0x00
#define | SD_SEND 0x01
#define | SD_BOTH 0x02

## Functions

static UPNP_INLINE int | sock_close (SOCKET sock)
| Closes the socket if it is different from -1.
int | sock_init ( SOCKINFO *info, SOCKET sockfd)
| Assign the passed in socket descriptor to socket descriptor in the SOCKINFO structure.
int | sock_init_with_ip ( SOCKINFO *info, SOCKET sockfd, struct sockaddr *foreign_sockaddr)
| Calls the sock_init function and assigns the passed in IP address and port to the IP address and port in the SOCKINFO structure.
int | sock_destroy ( SOCKINFO *info, int ShutdownMethod)
| Associates an SSL object with the socket and begins the client-side SSL/TLS handshake.
int | sock_read ( SOCKINFO *info, char *buffer, size_t bufsize, int *timeoutSecs)
| Reads data on socket in sockinfo.
int | sock_write ( SOCKINFO *info, const char *buffer, size_t bufsize, int *timeoutSecs)
| Writes data on the socket in sockinfo.
int | sock_make_blocking ( SOCKET sock)
| Make socket blocking.
int | sock_make_no_blocking ( SOCKET sock)
| Make socket non-blocking.