00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00027 #ifndef _RTXNETUTIL_H_
00028 #define _RTXNETUTIL_H_
00029
00030 #ifndef _OS_NOSOCKET
00031
00032 #include "rtxsrc/rtxContext.h"
00033 #include "rtxsrc/rtxSocket.h"
00034
00035 typedef enum {
00036 OSRTNetNoProto, OSRTNetHttp, OSRTNetFtp, OSRTNetOtherP
00037 } OSRTNetProtocol ;
00038
00039 typedef enum {
00040 OSRTNetNoTrans, OSRTNetTCP, OSRTNetUDP, OSRTNetOtherT
00041 } OSRTNetTransport ;
00042
00043 typedef struct OSRTNETCONN {
00044 OSCTXT* pctxt;
00045 OSRTSOCKET socket;
00046 char* urlbuf;
00047 const char* domain;
00048 const char* path;
00049 int port;
00050 OSRTNetProtocol protocol;
00051 OSRTNetTransport transport;
00052 } OSRTNETCONN;
00053
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057
00068 EXTERNRT OSRTNETCONN* rtxNetCreateConn (OSCTXT* pctxt, const char* url);
00069
00077 EXTERNRT int rtxNetCloseConn (OSRTNETCONN* pNetConn);
00078
00089 EXTERNRT int rtxNetConnect (OSRTNETCONN* pNetConn);
00090
00091 #ifdef __cplusplus
00092 }
00093 #endif
00094
00095 #endif
00096
00097 #endif