1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_socket.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center>
<hr><h1>oscl_socket.h</h1><a href="oscl__socket_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span>
00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00003
00004 <span class="comment">// O S C L _ S O C K E T</span>
00005
00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00007
00018 <span class="preprocessor">#ifndef OSCL_SOCKET_H_INCLUDED</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SOCKET_H_INCLUDED</span>
00020 <span class="preprocessor"></span>
00021 <span class="preprocessor">#ifndef OSCLCONFIG_IO_H_INCLUDED</span>
00022 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__io_8h.html">osclconfig_io.h</a>"</span>
00023 <span class="preprocessor">#endif</span>
00024 <span class="preprocessor"></span>
00025 <span class="preprocessor">#ifndef OSCL_SOCKET_TYPES_H_INCLUDED</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__socket__types_8h.html">oscl_socket_types.h</a>"</span>
00027 <span class="preprocessor">#endif</span>
00028 <span class="preprocessor"></span>
00029 <span class="preprocessor">#ifndef OSCL_HEAPBASE_H_INCLUDED</span>
00030 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__heapbase_8h.html">oscl_heapbase.h</a>"</span>
00031 <span class="preprocessor">#endif</span>
00032 <span class="preprocessor"></span>
00033 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
00034 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span>
00035 <span class="preprocessor">#endif</span>
00036 <span class="preprocessor"></span>
00037 <span class="preprocessor">#ifndef OSCL_VECTOR_H_INCLUDED</span>
00038 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__vector_8h.html">oscl_vector.h</a>"</span>
00039 <span class="preprocessor">#endif</span>
00040 <span class="preprocessor"></span>
00041 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
00042 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html">oscl_mem.h</a>"</span>
00043 <span class="preprocessor">#endif</span>
00044 <span class="preprocessor"></span>
00048 <span class="keyword">class </span><a class="code" href="classOsclSocketServI.html">OsclSocketServI</a>;
00049
<a name="l00050"></a><a class="code" href="classOsclSocketServ.html">00050</a> <span class="keyword">class </span><a class="code" href="classOsclSocketServ.html">OsclSocketServ</a> : <span class="keyword">public</span> <a class="code" href="classHeapBase.html">HeapBase</a>
00051 {
00052 <span class="keyword">public</span>:
00060 OSCL_IMPORT_REF <span class="keyword">static</span> <a class="code" href="classOsclSocketServ.html">OsclSocketServ</a> *<a class="code" href="classOsclSocketServ.html#d0">NewL</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc);
00061
00066 OSCL_IMPORT_REF <a class="code" href="classOsclSocketServ.html#a0">~OsclSocketServ</a>();
00067
00076 OSCL_IMPORT_REF int32 <a class="code" href="classOsclSocketServ.html#a1">Connect</a>(uint32 aMessageSlots = 8);
00077
00086 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServ.html#a2">Close</a>(<span class="keywordtype">bool</span> aCleanup = <span class="keyword">true</span>);
00087
00088 <span class="keyword">private</span>:
00089 <a class="code" href="classOsclSocketServ.html">OsclSocketServ</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc): iServ(<a class="code" href="group__osclbase.html#a81">NULL</a>), iAlloc(alloc) {}
00090
00091 <a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *iServ;
00092 <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &iAlloc;
00093
<a name="l00094"></a><a class="code" href="classOsclSocketServ.html#l0">00094</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclTCPSocket.html">OsclTCPSocket</a>;
<a name="l00095"></a><a class="code" href="classOsclSocketServ.html#l1">00095</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclUDPSocket.html">OsclUDPSocket</a>;
<a name="l00096"></a><a class="code" href="classOsclSocketServ.html#l2">00096</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclDNS.html">OsclDNS</a>;
00097
00098 };
00099
00100
00101 <span class="keyword">class </span><a class="code" href="classOsclUDPSocketI.html">OsclUDPSocketI</a>;
00102
<a name="l00107"></a><a class="code" href="classOsclUDPSocket.html">00107</a> <span class="keyword">class </span><a class="code" href="classOsclUDPSocket.html">OsclUDPSocket</a> : <span class="keyword">public</span> <a class="code" href="classHeapBase.html">HeapBase</a>
00108 {
00109 <span class="keyword">public</span>:
00122 OSCL_IMPORT_REF <span class="keyword">static</span> <a class="code" href="classOsclUDPSocket.html">OsclUDPSocket</a> *<a class="code" href="classOsclUDPSocket.html#d0">NewL</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc,
00123 <a class="code" href="classOsclSocketServ.html">OsclSocketServ</a>& aServ,
00124 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver,
00125 uint32 aId);
00126
00131 OSCL_IMPORT_REF <a class="code" href="classOsclUDPSocket.html#a0">~OsclUDPSocket</a>();
00132
00145 OSCL_IMPORT_REF int32 <a class="code" href="classOsclUDPSocket.html#a1">Close</a>();
00146
00155 OSCL_IMPORT_REF int32 <a class="code" href="classOsclUDPSocket.html#a2">Bind</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress);
00156
00167 OSCL_IMPORT_REF int32 <a class="code" href="classOsclUDPSocket.html#a3">Join</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress);
00168
00182 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclUDPSocket.html#a4">BindAsync</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress
00183 , int32 aTimeoutMsec = (-1));
00184
00193 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclUDPSocket.html#a5">CancelBind</a>();
00194
00204 OSCL_IMPORT_REF uint8 *<a class="code" href="classOsclUDPSocket.html#a6">GetRecvData</a>(int32 *aLength);
00205
00215 OSCL_IMPORT_REF uint8 *<a class="code" href="classOsclUDPSocket.html#a7">GetSendData</a>(int32 *aLength);
00216
00232 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclUDPSocket.html#a8">SendTo</a>(<span class="keyword">const</span> uint8* aPtr, uint32 aLen,
00233 <a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
00234 int32 aTimeoutMsec = -1);
00243 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclUDPSocket.html#a9">CancelSendTo</a>();
00244
00274 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclUDPSocket.html#a10">RecvFrom</a>(uint8* aPtr, uint32 aMaxLen,
00275 <a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
00276 int32 aTimeoutMsec = -1,
00277 uint32 aMultiRecvLimit = 0,
00278 <a class="code" href="classOscl__Vector.html">Oscl_Vector<uint32, OsclMemAllocator></a>* aPacketLen = <a class="code" href="group__osclbase.html#a81">NULL</a>,
00279 <a class="code" href="classOscl__Vector.html">Oscl_Vector<OsclNetworkAddress, OsclMemAllocator></a>* aPacketSource = NULL);
00288 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclUDPSocket.html#a11">CancelRecvFrom</a>();
00289
00299 OSCL_IMPORT_REF int32 <a class="code" href="classOsclUDPSocket.html#a12">SetRecvBufferSize</a>(uint32 size);
00300
00301 <span class="keyword">private</span>:
00302 <a class="code" href="classOsclUDPSocket.html">OsclUDPSocket</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc): iUDPSocket(NULL), iAlloc(alloc) {}
00303 <a class="code" href="classOsclUDPSocketI.html">OsclUDPSocketI</a> *iUDPSocket;
00304 <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &iAlloc;
00305 };
00306
00307 <span class="keyword">class </span><a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a>;
00308
<a name="l00313"></a><a class="code" href="classOsclTCPSocket.html">00313</a> <span class="keyword">class </span><a class="code" href="classOsclTCPSocket.html">OsclTCPSocket</a> : <span class="keyword">public</span> <a class="code" href="classHeapBase.html">HeapBase</a>
00314 {
00315 <span class="keyword">public</span>:
00328 OSCL_IMPORT_REF <span class="keyword">static</span> <a class="code" href="classOsclTCPSocket.html">OsclTCPSocket</a> *<a class="code" href="classOsclTCPSocket.html#d0">NewL</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc,
00329 <a class="code" href="classOsclSocketServ.html">OsclSocketServ</a>& aServ,
00330 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver,
00331 uint32 aId);
00332
00337 OSCL_IMPORT_REF <a class="code" href="classOsclTCPSocket.html#a0">~OsclTCPSocket</a>();
00338
00339
00352 OSCL_IMPORT_REF int32 <a class="code" href="classOsclTCPSocket.html#a1">Close</a>();
00353
00362 OSCL_IMPORT_REF int32 <a class="code" href="classOsclTCPSocket.html#a2">Bind</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress);
00363
00377 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a3">BindAsync</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress
00378 , int32 aTimeoutMsec = (-1));
00379
00388 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a4">CancelBind</a>();
00389
00398 OSCL_IMPORT_REF int32 <a class="code" href="classOsclTCPSocket.html#a5">Listen</a>(int32 aQueueSize);
00399
00413 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a6">ListenAsync</a>(int32 aQueueSize, int32 aTimeoutMsec = (-1));
00414
00423 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a7">CancelListen</a>();
00424
00437 OSCL_IMPORT_REF <a class="code" href="classOsclTCPSocket.html">OsclTCPSocket</a> *<a class="code" href="classOsclTCPSocket.html#a8">GetAcceptedSocketL</a>(uint32 aId);
00438
00448 OSCL_IMPORT_REF uint8 *<a class="code" href="classOsclTCPSocket.html#a9">GetRecvData</a>(int32 *aLength);
00449
00459 OSCL_IMPORT_REF uint8 *<a class="code" href="classOsclTCPSocket.html#a10">GetSendData</a>(int32 *aLength);
00460
00474 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a11">Connect</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
00475 int32 aTimeoutMsec = -1);
00476
00485 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a12">CancelConnect</a>();
00486
00500 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a13">Shutdown</a>(<a class="code" href="oscl__socket__types_8h.html#a21">TPVSocketShutdown</a> aHow,
00501 int32 aTimeoutMsec = -1);
00502
00511 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a14">CancelShutdown</a>();
00512
00525 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a15">Accept</a>(int32 aTimeout = -1);
00526
00535 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a16">CancelAccept</a>();
00536
00551 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a17">Send</a>(<span class="keyword">const</span> uint8* aPtr, uint32 aLen,
00552 int32 aTimeoutMsec = -1);
00553
00562 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a18">CancelSend</a>();
00563
00578 OSCL_IMPORT_REF <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocket.html#a19">Recv</a>(uint8* aPtr, uint32 aMaxLen,
00579 int32 aTimeoutMsec = -1);
00580
00589 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocket.html#a20">CancelRecv</a>();
00590
00591 <span class="keyword">private</span>:
00592 <span class="keyword">static</span> <a class="code" href="classOsclTCPSocket.html">OsclTCPSocket</a> *<a class="code" href="classOsclTCPSocket.html#d0">NewL</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc, <a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a>* aSocket);
00593
00594 <span class="keyword">private</span>:
00595 <a class="code" href="classOsclTCPSocket.html">OsclTCPSocket</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc): iTCPSocket(<a class="code" href="group__osclbase.html#a81">NULL</a>), iAlloc(alloc) {}
00596 <a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a> *iTCPSocket;
00597 <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &iAlloc;
00598 };
00599
00600 <span class="preprocessor">#endif</span>
00601 <span class="preprocessor"></span>
00602
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>
|