35 #elif defined(_WIN32) || defined(_WIN64) 36 #include <sys/types.h> 37 #define INCL_WINSOCK_API_TYPEDEFS 1 38 #define INCL_WINSOCK_API_PROTOTYPES 0 43 #include <sys/types.h> 45 #include <sys/socket.h> 46 #include <netinet/in.h> 49 #include <arpa/inet.h> 52 #include "rtxsrc/osSysTypes.h" 62 #if (defined (_WIN32) || defined (_WIN64)) && !defined(__SYMBIAN32__) 68 #define OSRTSOCKET_INVALID ((OSRTSOCKET)-1) 82 #define OSIPADDR_ANY ((OSIPADDR)0) 83 #define OSIPADDR_LOCAL ((OSIPADDR)0x7f000001UL) 106 EXTERNRT
int rtxSocketAccept (OSRTSOCKET socket, OSRTSOCKET *pNewSocket,
107 OSIPADDR* destAddr,
int* destPort);
134 EXTERNRT
int rtxSocketBind (OSRTSOCKET socket, OSIPADDR addr,
int port);
161 EXTERNRT
int rtxSocketConnect (OSRTSOCKET socket,
const char* host,
int port);
180 (OSRTSOCKET socket,
const char* host,
int port,
int nsecs);
199 EXTERNRT
int rtxSocketCreateUDP (OSRTSOCKET *psocket);
254 (
char* url,
char** protocol,
char** address,
int* port);
270 EXTERNRT
int rtxSocketRecv (OSRTSOCKET socket, OSOCTET* pbuf,
size_t bufsize);
289 (OSRTSOCKET socket, OSOCTET* pbuf,
size_t bufsize, OSUINT32 secs);
308 EXTERNRT
int rtxSocketSelect (
int nfds, fd_set* readfds, fd_set* writefds,
309 fd_set* exceptfds,
struct timeval* timeout);
324 (OSRTSOCKET socket,
const OSOCTET* pdata,
size_t size);
EXTERNRT int rtxSocketRecv(OSRTSOCKET socket, OSOCTET *pbuf, size_t bufsize)
This function receives data from a connected socket.
EXTERNRT int rtxSocketConnectTimed(OSRTSOCKET socket, const char *host, int port, int nsecs)
This function establishes a connection to a specified socket.
EXTERNRT int rtxSocketAccept(OSRTSOCKET socket, OSRTSOCKET *pNewSocket, OSIPADDR *destAddr, int *destPort)
This function permits an incoming connection attempt on a socket.
EXTERNRT int rtxSocketsInit(OSVOIDARG)
This function initiates use of sockets by an application.
int OSRTSOCKET
Socket handle type definition.
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 compo...
EXTERNRT int rtxSocketConnect(OSRTSOCKET socket, const char *host, int port)
This function establishes a connection to a specified socket.
EXTERNRT int rtxSocketAddrToStr(OSIPADDR ipAddr, char *pbuf, size_t bufsize)
This function converts an IP address to its string representation.
EXTERNRT int rtxSocketStrToAddr(const char *pIPAddrStr, OSIPADDR *pIPAddr)
This function converts the string with IP address to a double word representation.
EXTERNRT int rtxSocketSetBlocking(OSRTSOCKET socket, OSBOOL value)
This function turns blocking mode for a socket on or off.
EXTERNRT int rtxSocketCreate(OSRTSOCKET *psocket)
This function creates a TCP socket.
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 rtxSocketListen(OSRTSOCKET socket, int maxConnection)
This function places a socket a state where it is listening for an incoming connection.
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 rtxSocketGetHost(const char *host, struct in_addr *inaddr)
This function resolves the given host name to an IP address.
EXTERNRT int rtxSocketSend(OSRTSOCKET socket, const OSOCTET *pdata, size_t size)
This function sends data on a connected socket.
Common definitions of external function modifiers used to define the scope of functions used in DLL's...
unsigned long OSIPADDR
The IP address represented as unsigned long value.
EXTERNRT int rtxSocketRecvTimed(OSRTSOCKET socket, OSOCTET *pbuf, size_t bufsize, OSUINT32 secs)
This function receives data from a connected socket on a timed basis.