sock.c File Reference
Network Socket Library

Implements the sockets functionality. More...

`#include "config.h"`
`#include "sock.h"`
`#include "unixutil.h"`
`#include "upnp.h"`
`#include "UpnpStdInt.h"`
`#include "upnpdebug.h"`
`#include "upnputil.h"`
`#include <assert.h>`
`#include <errno.h>`
`#include <fcntl.h>`
`#include <time.h>`
`#include <string.h>`
Include dependency graph for sock.c:

## Macros

#define | MSG_NOSIGNAL 0

## Functions

int | sock_init ( SOCKINFO *info, SOCKET sockfd)
| Assign the passed in socket descriptor to socket descriptor in the SOCKINFO structure. More...
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. More...
int | sock_destroy ( SOCKINFO *info, int ShutdownMethod)
| Associates an SSL object with the socket and begins the client-side SSL/TLS handshake. More...
static int | sock_read_write (SOCKINFO *info, char *buffer, size_t bufsize, int *timeoutSecs, int bRead)
| Receives or sends data. Also returns the time taken to receive or send data. More...
int | sock_read ( SOCKINFO *info, char *buffer, size_t bufsize, int *timeoutSecs)
| Reads data on socket in sockinfo. More...
int | sock_write ( SOCKINFO *info, const char *buffer, size_t bufsize, int *timeoutSecs)
| Writes data on the socket in sockinfo. More...
int | sock_make_blocking ( SOCKET sock)
| Make socket blocking. More...
int | sock_make_no_blocking ( SOCKET sock)
| Make socket non-blocking. More...

## Detailed Description

Implements the sockets functionality.