rtxSocket.h File Reference

#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <arpa/inet.h>
#include "rtxsrc/osSysTypes.h"
#include "rtxsrc/rtxExternDefs.h"

Go to the source code of this file.

Typedefs

typedef int OSRTSOCKET
 Socket handle type definition.
typedef unsigned long OSIPADDR
 The IP address represented as unsigned long value.

Functions

EXTERNRT int rtxSocketAccept (OSRTSOCKET socket, OSRTSOCKET *pNewSocket, OSIPADDR *destAddr, int *destPort)
 This function permits an incoming connection attempt on a socket.
EXTERNRT int rtxSocketAddrToStr (OSIPADDR ipAddr, char *pbuf, size_t bufsize)
 This function converts an IP address to its string representation.
EXTERNRT int rtxSocketBind (OSRTSOCKET socket, OSIPADDR addr, int port)
 This function associates a local address with a socket.
EXTERNRT int rtxSocketClose (OSRTSOCKET socket)
 This function closes an existing socket.
EXTERNRT int rtxSocketConnect (OSRTSOCKET socket, const char *host, int port)
 This function establishes a connection to a specified socket.
EXTERNRT int rtxSocketConnectTimed (OSRTSOCKET socket, const char *host, int port, int nsecs)
 This function establishes a connection to a specified socket.
EXTERNRT int rtxSocketCreate (OSRTSOCKET *psocket)
 This function creates a TCP socket.
EXTERNRT int rtxSocketGetHost (const char *host, struct in_addr *inaddr)
 This function resolves the given host name to an IP address.
EXTERNRT int rtxSocketsInit (OSVOIDARG)
 This function initiates use of sockets by an application.
EXTERNRT int rtxSocketListen (OSRTSOCKET socket, int maxConnection)
 This function places a socket a state where it is listening for an incoming connection.
EXTERNRT int rtxSocketParseURL (char *url, char **protocol, char **address, int *port)
 This function parses a simple URL of the form <protocol>://<address>:<port> into its individual components.
EXTERNRT int rtxSocketRecv (OSRTSOCKET socket, OSOCTET *pbuf, size_t bufsize)
 This function receives data from a connected socket.
EXTERNRT int rtxSocketRecvTimed (OSRTSOCKET socket, OSOCTET *pbuf, size_t bufsize, OSUINT32 secs)
 This function receives data from a connected socket on a timed basis.
EXTERNRT int rtxSocketSelect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
 This function is used for synchronous monitoring of multiple sockets.
EXTERNRT int rtxSocketSend (OSRTSOCKET socket, const OSOCTET *pdata, size_t size)
 This function sends data on a connected socket.
EXTERNRT int rtxSocketSetBlocking (OSRTSOCKET socket, OSBOOL value)
 This function turns blocking mode for a socket on or off.
EXTERNRT int rtxSocketStrToAddr (const char *pIPAddrStr, OSIPADDR *pIPAddr)
 This function converts the string with IP address to a double word representation.

Detailed Description

Definition in file rtxSocket.h.