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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: oscl_tcp_socket.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>oscl_tcp_socket.h</h1><a href="oscl__tcp__socket_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00002"></a>00002 <span class="preprocessor">#ifndef OSCL_TCP_SOCKET_H_INCLUDED</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_TCP_SOCKET_H_INCLUDED</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span>
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef OSCL_IP_SOCKET_H_INCLUDED</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__ip__socket_8h.html">oscl_ip_socket.h</a>"</span>
<a name="l00007"></a>00007 <span class="preprocessor">#endif</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span>
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html" title="The file defines simple default memory allocator classes. These allocators are used...">oscl_defalloc.h</a>"</span>
<a name="l00011"></a>00011 <span class="preprocessor">#endif</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef OSCL_VECTOR_H_INCLUDED</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__vector_8h.html" title="The file oscl_vector.h defines the template class Oscl_Vector which has a very similar...">oscl_vector.h</a>"</span>
<a name="l00015"></a>00015 <span class="preprocessor">#endif</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html" title="This file contains basic memory definitions for common use across platforms.">oscl_mem.h</a>"</span>
<a name="l00019"></a>00019 <span class="preprocessor">#endif</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="keyword">class </span><a class="code" href="classOsclBindMethod.html">OsclBindMethod</a>;
<a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="classOsclListenMethod.html">OsclListenMethod</a>;
<a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="classOsclConnectMethod.html">OsclConnectMethod</a>;
<a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="classOsclShutdownMethod.html">OsclShutdownMethod</a>;
<a name="l00025"></a>00025 <span class="keyword">class </span><a class="code" href="classOsclAcceptMethod.html">OsclAcceptMethod</a>;
<a name="l00026"></a>00026 <span class="keyword">class </span><a class="code" href="classOsclSendMethod.html">OsclSendMethod</a>;
<a name="l00027"></a>00027 <span class="keyword">class </span><a class="code" href="classOsclRecvMethod.html">OsclRecvMethod</a>;
<a name="l00028"></a>00028
<a name="l00031"></a><a class="code" href="classOsclTCPSocketI.html">00031</a> <span class="keyword">class </span><a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a> : <span class="keyword">public</span> <a class="code" href="classOsclIPSocketI.html">OsclIPSocketI</a>
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033 <span class="keyword">public</span>:
<a name="l00034"></a>00034 <span class="comment">//Synchronous methods</span>
<a name="l00035"></a>00035 <span class="keyword">static</span> <a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a> *<a class="code" href="classOsclTCPSocketI.html#a0ae0ec38dfef71c34bfe75535fbcb75a">NewL</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &a,
<a name="l00036"></a>00036 <a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *aServ,
<a name="l00037"></a>00037 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver,
<a name="l00038"></a>00038 uint32 aId);
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="keyword">virtual</span> <a class="code" href="classOsclTCPSocketI.html#adc67bb406300ddaf52e436d6bf782367">~OsclTCPSocketI</a>();
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a79afa407ecca6752e59edf698a518552">ThreadLogoff</a>();
<a name="l00043"></a>00043 <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#aef10b2c90bb7c40a448209820937c1a5">ThreadLogon</a>(
<a name="l00044"></a>00044 <a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *aServ,
<a name="l00045"></a>00045 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver
<a name="l00046"></a>00046 );
<a name="l00047"></a>00047 int32 <a class="code" href="classOsclTCPSocketI.html#aaa6758d7f408564db9bbc52c327bb6dd">Close</a>();
<a name="l00048"></a>00048 <span class="keyword">inline</span> int32 <a class="code" href="classOsclTCPSocketI.html#a0972b30ae9e7b5c8d67575f8410a7571">Listen</a>(<span class="keywordtype">int</span> aQueueSize);
<a name="l00049"></a>00049 <span class="comment">//the returned value is platform-specific</span>
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a> *<a class="code" href="classOsclTCPSocketI.html#a52ca2dbe122b8ad94209c7e50d87af4a">GetAcceptedSocketL</a>(uint32 aId);
<a name="l00052"></a>00052
<a name="l00053"></a>00053 <span class="keyword">inline</span> uint8 *<a class="code" href="classOsclTCPSocketI.html#ac0829fbcccafd7fc29bc5e5d51f186fa">GetRecvData</a>(int32 *aLength) ;
<a name="l00054"></a>00054 <span class="keyword">inline</span> uint8 *<a class="code" href="classOsclTCPSocketI.html#a7d421d4bca6a95e28f0b0154127cc8fe">GetSendData</a>(int32 *aLength);
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">//Asynchronous methods</span>
<a name="l00057"></a>00057 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#aafde61f2938087134c19c7108e716ea7">BindAsync</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
<a name="l00058"></a>00058 int32 aTimeoutMsec = -1);
<a name="l00059"></a>00059 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a74dbb2d5153da34fea4a328e1e09eea2">CancelBind</a>();
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a6ad3238e0e82fb1e7ec461c8c0c35106">ListenAsync</a>(uint32 qsize,
<a name="l00062"></a>00062 int32 aTimeoutMsec = -1);
<a name="l00063"></a>00063 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a6309a933369db451755bc9f7845bf252">CancelListen</a>();
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a8384cb9c43cd9bea48b58adadde5c9cc">Connect</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
<a name="l00066"></a>00066 int32 aTimeoutMsec = -1);
<a name="l00067"></a>00067 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a352590261a9ed2ac97085176062b2c7b">CancelConnect</a>();
<a name="l00068"></a>00068
<a name="l00069"></a>00069 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#ad5d72303a513fbbd42ba170163fa362a">Shutdown</a>(<a class="code" href="oscl__socket__types_8h.html#a20988040ed0794b81547c60b5ffdde79">TPVSocketShutdown</a> aHow,
<a name="l00070"></a>00070 int32 aTimeoutMsec = -1);
<a name="l00071"></a>00071 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a5d08ff06f9792352a84bfd3becafa256">CancelShutdown</a>();
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a0024c017310cfd4d60aede232af8ccb4">Accept</a>(int32 aTimeout = -1);
<a name="l00074"></a>00074 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#ab9673050f1a8a311dbc09cff565920c6">CancelAccept</a>();
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#afd8cbb481b7ff1e64883dc38b5d03535">Send</a>(<span class="keyword">const</span> uint8* &aPtr, uint32 aLen,
<a name="l00077"></a>00077 int32 aTimeoutMsec = -1);
<a name="l00078"></a>00078 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#aa7610df291b0999717827d2b4d1c4de3">CancelSend</a>();
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#ae474d2329c1e8689f9dee388051e8c06">Recv</a>(uint8* &aPtr, uint32 aMaxLen,
<a name="l00081"></a>00081 int32 aTimeoutMsec = -1);
<a name="l00082"></a>00082 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#ab85eea7f3519ab2e66fe3c7280ad051b">CancelRecv</a>();
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="keyword">private</span>:
<a name="l00085"></a>00085 <span class="keyword">static</span> <a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a> *<a class="code" href="classOsclTCPSocketI.html#a0ae0ec38dfef71c34bfe75535fbcb75a">NewL</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &a,
<a name="l00086"></a>00086 <a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *aServ,
<a name="l00087"></a>00087 <a class="code" href="classOsclSocketI.html">OsclSocketI</a> *aSocket,
<a name="l00088"></a>00088 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver,
<a name="l00089"></a>00089 uint32 aId);
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <a class="code" href="classOsclTCPSocketI.html">OsclTCPSocketI</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &a) : <a class="code" href="classOsclIPSocketI.html#abc7ca05ff93057858d650f2cf083036a">OsclIPSocketI</a>(a),
<a name="l00092"></a>00092 iConnectMethod(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>),
<a name="l00093"></a>00093 iShutdownMethod(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>),
<a name="l00094"></a>00094 iAcceptMethod(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>),
<a name="l00095"></a>00095 iSendMethod(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>),
<a name="l00096"></a>00096 iRecvMethod(<a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>)
<a name="l00097"></a>00097 {}
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="keywordtype">void</span> ConstructL(<a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *aServ,
<a name="l00100"></a>00100 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver,
<a name="l00101"></a>00101 uint32 aId);
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="keywordtype">void</span> ConstructL(<a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *aServ,
<a name="l00104"></a>00104 <a class="code" href="classOsclSocketI.html">OsclSocketI</a> *aSocket,
<a name="l00105"></a>00105 <a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver,
<a name="l00106"></a>00106 uint32 aId);
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <a class="code" href="classOsclBindMethod.html">OsclBindMethod</a> *iBindMethod;
<a name="l00109"></a>00109 <a class="code" href="classOsclListenMethod.html">OsclListenMethod</a> *iListenMethod;
<a name="l00110"></a>00110 <a class="code" href="classOsclConnectMethod.html">OsclConnectMethod</a> *iConnectMethod;
<a name="l00111"></a>00111 <a class="code" href="classOsclShutdownMethod.html">OsclShutdownMethod</a> *iShutdownMethod;
<a name="l00112"></a>00112 <a class="code" href="classOsclAcceptMethod.html">OsclAcceptMethod</a> *iAcceptMethod;
<a name="l00113"></a>00113 <a class="code" href="classOsclSendMethod.html">OsclSendMethod</a> *iSendMethod;
<a name="l00114"></a>00114 <a class="code" href="classOsclRecvMethod.html">OsclRecvMethod</a> *iRecvMethod;
<a name="l00115"></a>00115 };
<a name="l00116"></a>00116
<a name="l00117"></a>00117 <span class="preprocessor">#include "<a class="code" href="oscl__socket__listen_8h.html">oscl_socket_listen.h</a>"</span>
<a name="l00118"></a>00118 <span class="preprocessor">#include "<a class="code" href="oscl__socket__recv_8h.html">oscl_socket_recv.h</a>"</span>
<a name="l00119"></a>00119 <span class="preprocessor">#include "<a class="code" href="oscl__socket__send_8h.html">oscl_socket_send.h</a>"</span>
<a name="l00120"></a>00120 <span class="preprocessor">#include "<a class="code" href="oscl__socket__accept_8h.html">oscl_socket_accept.h</a>"</span>
<a name="l00121"></a>00121 <span class="preprocessor">#include "<a class="code" href="oscl__socket__shutdown_8h.html">oscl_socket_shutdown.h</a>"</span>
<a name="l00122"></a>00122 <span class="preprocessor">#include "<a class="code" href="oscl__socket__connect_8h.html">oscl_socket_connect.h</a>"</span>
<a name="l00123"></a>00123 <span class="preprocessor">#include "<a class="code" href="oscl__socket__bind_8h.html">oscl_socket_bind.h</a>"</span>
<a name="l00124"></a>00124
<a name="l00126"></a><a class="code" href="classOsclTCPSocketI.html#a0972b30ae9e7b5c8d67575f8410a7571">00126</a> <span class="keyword">inline</span> int32 <a class="code" href="classOsclTCPSocketI.html#a0972b30ae9e7b5c8d67575f8410a7571">OsclTCPSocketI::Listen</a>(<span class="keywordtype">int</span> aQueueSize)
<a name="l00127"></a>00127 {
<a name="l00128"></a>00128 <span class="keywordflow">return</span> <a class="code" href="classOsclIPSocketI.html#a1d4774164f330aed90aa28eb0cf0ad6f">iSocket</a>-><a class="code" href="classOsclSocketI.html#a0c4d70cff509e8badd814fa11dc48553">Listen</a>(aQueueSize) ;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130
<a name="l00132"></a><a class="code" href="classOsclTCPSocketI.html#ac0829fbcccafd7fc29bc5e5d51f186fa">00132</a> <span class="keyword">inline</span> uint8 *<a class="code" href="classOsclTCPSocketI.html#ac0829fbcccafd7fc29bc5e5d51f186fa">OsclTCPSocketI::GetRecvData</a>(int32 *aLength)
<a name="l00133"></a>00133 {
<a name="l00134"></a>00134 <span class="keywordflow">return</span> iRecvMethod-><a class="code" href="classOsclRecvMethod.html#a72b5a70a9b42a9dd27bb8a964cd889ed">GetRecvData</a>(aLength);
<a name="l00135"></a>00135 }
<a name="l00136"></a>00136
<a name="l00138"></a><a class="code" href="classOsclTCPSocketI.html#a7d421d4bca6a95e28f0b0154127cc8fe">00138</a> <span class="keyword">inline</span> uint8 *<a class="code" href="classOsclTCPSocketI.html#a7d421d4bca6a95e28f0b0154127cc8fe">OsclTCPSocketI::GetSendData</a>(int32 *aLength)
<a name="l00139"></a>00139 {
<a name="l00140"></a>00140 <span class="keywordflow">return</span> iSendMethod-><a class="code" href="classOsclSendMethod.html#aa9548dacf3a7b09d7dcf2e52acfc7745">GetSendData</a>(aLength);
<a name="l00141"></a>00141 }
<a name="l00142"></a>00142
<a name="l00144"></a><a class="code" href="classOsclTCPSocketI.html#aafde61f2938087134c19c7108e716ea7">00144</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#aafde61f2938087134c19c7108e716ea7">OsclTCPSocketI::BindAsync</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
<a name="l00145"></a>00145 int32 aTimeout)
<a name="l00146"></a>00146 {
<a name="l00147"></a>00147 <span class="keywordflow">if</span> (!<a class="code" href="classOsclSocketIBase.html#a83ba123865c418e351d90715ac189eba">OsclSocketIBase::HasAsyncBind</a>())
<a name="l00148"></a>00148 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa08efa654432845b433225b78baae7dda">EPVSocketNotImplemented</a>;
<a name="l00149"></a>00149 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00150"></a>00150 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//not available.</span>
<a name="l00151"></a>00151
<a name="l00152"></a>00152 <a class="code" href="classOsclIPSocketI.html#a07691f06575648708c3359d4e37aeb8d">iAddress</a>.<a class="code" href="classOsclNetworkAddress.html#a8d08171d7c23b63a81c1a3e1a87c8989">ipAddr</a>.<a class="code" href="classOsclNameString.html#a9c04098b5f8f316ed9dc47ae136f0aac">Set</a>(aAddress.<a class="code" href="classOsclNetworkAddress.html#a8d08171d7c23b63a81c1a3e1a87c8989">ipAddr</a>.<a class="code" href="classOsclNameString.html#a5d435db47b92996f464e607bdd11fa0b">Str</a>());
<a name="l00153"></a>00153 <a class="code" href="classOsclIPSocketI.html#a07691f06575648708c3359d4e37aeb8d">iAddress</a>.<a class="code" href="classOsclNetworkAddress.html#a35425980e071c860a25d36fa54403b6a">port</a> = aAddress.<a class="code" href="classOsclNetworkAddress.html#a35425980e071c860a25d36fa54403b6a">port</a>;
<a name="l00154"></a>00154 <span class="keywordflow">return</span> (iBindMethod-><a class="code" href="classOsclBindMethod.html#a9d6214d189e859bd256eb476d2272f5c">Bind</a>(aAddress, aTimeout));
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156
<a name="l00157"></a><a class="code" href="classOsclTCPSocketI.html#a74dbb2d5153da34fea4a328e1e09eea2">00157</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a74dbb2d5153da34fea4a328e1e09eea2">OsclTCPSocketI::CancelBind</a>()
<a name="l00158"></a>00158 {
<a name="l00159"></a>00159 iBindMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00160"></a>00160 }
<a name="l00161"></a>00161
<a name="l00163"></a><a class="code" href="classOsclTCPSocketI.html#a6ad3238e0e82fb1e7ec461c8c0c35106">00163</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a6ad3238e0e82fb1e7ec461c8c0c35106">OsclTCPSocketI::ListenAsync</a>(uint32 qsize,
<a name="l00164"></a>00164 int32 aTimeout)
<a name="l00165"></a>00165 {
<a name="l00166"></a>00166 <span class="keywordflow">if</span> (!<a class="code" href="classOsclSocketIBase.html#a1a6059ecfbde8ad34475c6d6cce8a306">OsclSocketIBase::HasAsyncListen</a>())
<a name="l00167"></a>00167 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa08efa654432845b433225b78baae7dda">EPVSocketNotImplemented</a>;
<a name="l00168"></a>00168 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00169"></a>00169 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//not available</span>
<a name="l00170"></a>00170
<a name="l00171"></a>00171 <span class="keywordflow">return</span> (iListenMethod-><a class="code" href="classOsclListenMethod.html#a9dda216fa8b31e02cfc041f7c82c04bf">Listen</a>(qsize, aTimeout));
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173
<a name="l00174"></a><a class="code" href="classOsclTCPSocketI.html#a6309a933369db451755bc9f7845bf252">00174</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a6309a933369db451755bc9f7845bf252">OsclTCPSocketI::CancelListen</a>()
<a name="l00175"></a>00175 {
<a name="l00176"></a>00176 iListenMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00177"></a>00177 }
<a name="l00178"></a>00178
<a name="l00180"></a><a class="code" href="classOsclTCPSocketI.html#a8384cb9c43cd9bea48b58adadde5c9cc">00180</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a8384cb9c43cd9bea48b58adadde5c9cc">OsclTCPSocketI::Connect</a>(<a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>& aAddress,
<a name="l00181"></a>00181 int32 aTimeout)
<a name="l00182"></a>00182 {
<a name="l00183"></a>00183 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00184"></a>00184 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//socket is logged off.</span>
<a name="l00185"></a>00185 <span class="keywordflow">return</span> (iConnectMethod-><a class="code" href="classOsclConnectMethod.html#a2e8b6c4092c7de6f286cd64522128ac5">Connect</a>(aAddress, aTimeout));
<a name="l00186"></a>00186 }
<a name="l00187"></a>00187
<a name="l00188"></a><a class="code" href="classOsclTCPSocketI.html#a352590261a9ed2ac97085176062b2c7b">00188</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a352590261a9ed2ac97085176062b2c7b">OsclTCPSocketI::CancelConnect</a>()
<a name="l00189"></a>00189 {
<a name="l00190"></a>00190 iConnectMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00191"></a>00191 }
<a name="l00192"></a>00192
<a name="l00194"></a><a class="code" href="classOsclTCPSocketI.html#ad5d72303a513fbbd42ba170163fa362a">00194</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#ad5d72303a513fbbd42ba170163fa362a">OsclTCPSocketI::Shutdown</a>(<a class="code" href="oscl__socket__types_8h.html#a20988040ed0794b81547c60b5ffdde79">TPVSocketShutdown</a> aHow,
<a name="l00195"></a>00195 int32 aTimeout)
<a name="l00196"></a>00196 {
<a name="l00197"></a>00197 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00198"></a>00198 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//socket is logged off.</span>
<a name="l00199"></a>00199 <span class="keywordflow">return</span> (iShutdownMethod-><a class="code" href="classOsclShutdownMethod.html#aa4b25492090f219f5300ee85aa2f49d6">Shutdown</a>(aHow, aTimeout));
<a name="l00200"></a>00200 }
<a name="l00201"></a>00201
<a name="l00202"></a><a class="code" href="classOsclTCPSocketI.html#a5d08ff06f9792352a84bfd3becafa256">00202</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#a5d08ff06f9792352a84bfd3becafa256">OsclTCPSocketI::CancelShutdown</a>()
<a name="l00203"></a>00203 {
<a name="l00204"></a>00204 iShutdownMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00205"></a>00205 }
<a name="l00206"></a>00206
<a name="l00208"></a><a class="code" href="classOsclTCPSocketI.html#a0024c017310cfd4d60aede232af8ccb4">00208</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#a0024c017310cfd4d60aede232af8ccb4">OsclTCPSocketI::Accept</a>(int32 aTimeout)
<a name="l00209"></a>00209 {
<a name="l00210"></a>00210 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00211"></a>00211 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//socket is logged off.</span>
<a name="l00212"></a>00212 <span class="keywordflow">return</span> (iAcceptMethod-><a class="code" href="classOsclAcceptMethod.html#a96f2338d89f201d928d6c2bf56557589">Accept</a>(aTimeout));
<a name="l00213"></a>00213 }
<a name="l00214"></a>00214
<a name="l00215"></a><a class="code" href="classOsclTCPSocketI.html#ab9673050f1a8a311dbc09cff565920c6">00215</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#ab9673050f1a8a311dbc09cff565920c6">OsclTCPSocketI::CancelAccept</a>()
<a name="l00216"></a>00216 {
<a name="l00217"></a>00217 iAcceptMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00218"></a>00218 }
<a name="l00219"></a>00219
<a name="l00221"></a><a class="code" href="classOsclTCPSocketI.html#afd8cbb481b7ff1e64883dc38b5d03535">00221</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#afd8cbb481b7ff1e64883dc38b5d03535">OsclTCPSocketI::Send</a>(<span class="keyword">const</span> uint8* &aPtr, uint32 aLen,
<a name="l00222"></a>00222 int32 aTimeoutMsec)
<a name="l00223"></a>00223 {
<a name="l00224"></a>00224 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00225"></a>00225 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//socket is logged off.</span>
<a name="l00226"></a>00226 <span class="keywordflow">return</span> (iSendMethod-><a class="code" href="classOsclSendMethod.html#a9f2624444526d1c6ea4662240f3475df">Send</a>(aPtr, aLen, aTimeoutMsec));
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228
<a name="l00229"></a><a class="code" href="classOsclTCPSocketI.html#aa7610df291b0999717827d2b4d1c4de3">00229</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#aa7610df291b0999717827d2b4d1c4de3">OsclTCPSocketI::CancelSend</a>()
<a name="l00230"></a>00230 {
<a name="l00231"></a>00231 iSendMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00232"></a>00232 }
<a name="l00233"></a>00233
<a name="l00235"></a><a class="code" href="classOsclTCPSocketI.html#ae474d2329c1e8689f9dee388051e8c06">00235</a> <span class="keyword">inline</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddff">TPVSocketEvent</a> <a class="code" href="classOsclTCPSocketI.html#ae474d2329c1e8689f9dee388051e8c06">OsclTCPSocketI::Recv</a>(uint8* &aPtr, uint32 aMaxLen,
<a name="l00236"></a>00236 int32 aTimeout)
<a name="l00237"></a>00237 {
<a name="l00238"></a>00238 <span class="keywordflow">if</span> (!<a class="code" href="classOsclIPSocketI.html#ab540be3f3756b1eb42df323135a3160b">iObserver</a>)
<a name="l00239"></a>00239 <span class="keywordflow">return</span> <a class="code" href="oscl__socket__types_8h.html#a4997c79c51d21741526e9c3890d2ddffa1c3302e66dbf78754d97f079366da1e8">EPVSocketFailure</a>;<span class="comment">//socket is logged off.</span>
<a name="l00240"></a>00240 <span class="keywordflow">return</span> (iRecvMethod-><a class="code" href="classOsclRecvMethod.html#a76228ee597ab0371972d5e93d396229a">Recv</a>(aPtr, aMaxLen, aTimeout));
<a name="l00241"></a>00241 }
<a name="l00242"></a>00242
<a name="l00243"></a><a class="code" href="classOsclTCPSocketI.html#ab85eea7f3519ab2e66fe3c7280ad051b">00243</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classOsclTCPSocketI.html#ab85eea7f3519ab2e66fe3c7280ad051b">OsclTCPSocketI::CancelRecv</a>()
<a name="l00244"></a>00244 {
<a name="l00245"></a>00245 iRecvMethod-><a class="code" href="classOsclSocketMethod.html#a341f073186695634c47402e008f0b507">CancelMethod</a>();
<a name="l00246"></a>00246 }
<a name="l00247"></a>00247
<a name="l00248"></a>00248 <span class="preprocessor">#endif</span>
<a name="l00249"></a>00249 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.004.1.1 </small>
</small></address>
</body>
</html>
|