Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

rtxSocket.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003-2006 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
00022  *
00023  *****************************************************************************/
00027 #ifndef _RTXSOCKET_H_
00028 #define _RTXSOCKET_H_
00029 
00030 #include "rtxsrc/rtxCommon.h"
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 #if defined (_WIN64)
00037 typedef unsigned __int64 OSRTSOCKET; 
00038 #elif defined (_WIN32)
00039 typedef unsigned int OSRTSOCKET; 
00040 #else
00041 typedef int OSRTSOCKET;          
00042 #endif
00043 
00044 #define OSRTSOCKET_INVALID ((OSRTSOCKET)-1)
00045 
00056 typedef unsigned long OSIPADDR;
00057 
00058 #define OSIPADDR_ANY   ((OSIPADDR)0)
00059 #define OSIPADDR_LOCAL ((OSIPADDR)0x7f000001UL) /* 127.0.0.1 */
00060 
00061 struct in_addr;
00062 
00082 EXTERNRTX int rtxSocketAccept (OSRTSOCKET socket, OSRTSOCKET *pNewSocket, 
00083                                OSIPADDR* destAddr, int* destPort);
00084 
00095 EXTERNRTX int rtxSocketAddrToStr (OSIPADDR ipAddr, char* pbuf, size_t bufsize);
00096 
00110 EXTERNRTX int rtxSocketBind (OSRTSOCKET socket, OSIPADDR addr, int port);
00111 
00120 EXTERNRTX int rtxSocketClose (OSRTSOCKET socket);
00121 
00137 EXTERNRTX int rtxSocketConnect (OSRTSOCKET socket, const char* host, int port);
00138 
00148 EXTERNRTX int rtxSocketCreate (OSRTSOCKET* psocket);
00149 
00159 EXTERNRTX int rtxSocketGetHost (const char* host, struct in_addr *inaddr);
00160 
00168 EXTERNRTX int rtxSocketsInit ();
00169 
00185 EXTERNRTX int rtxSocketListen (OSRTSOCKET socket, int maxConnection);
00186 
00199 EXTERNRTX int rtxSocketRecv (OSRTSOCKET socket, OSOCTET* pbuf, int bufsize);
00200 
00213 EXTERNRTX int rtxSocketSend (OSRTSOCKET socket, const OSOCTET* pdata, int size);
00214 
00227 EXTERNRTX int rtxSocketStrToAddr (const char* pIPAddrStr, OSIPADDR* pIPAddr);
00228 
00232 #ifdef __cplusplus
00233 }
00234 #endif
00235 
00236 #endif /* _RTXSOCKET_H_ */
00237 

This file was last modified on 8 Jan 2007.
XBinder, Version 1.1.9