1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title>OsclTCPSocket class Reference</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <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> 9 <hr><h1>OsclTCPSocket Class Reference<br> 10 <small> 11 [<a class="el" href="group__osclio.html">OSCL IO</a>]</small> 12 </h1><code>#include <<a class="el" href="oscl__socket_8h-source.html">oscl_socket.h</a>></code> 13 <p> 14 <p>Inheritance diagram for OsclTCPSocket: 15 <p><center><img src="classOsclTCPSocket.png" usemap="#OsclTCPSocket_map" border="0" alt=""></center> 16 <map name="OsclTCPSocket_map"> 17 <area href="classHeapBase.html" alt="HeapBase" shape="rect" coords="0,56,103,80"> 18 <area href="class__OsclHeapBase.html" alt="_OsclHeapBase" shape="rect" coords="0,0,103,24"> 19 </map> 20 <table border=0 cellpadding=0 cellspacing=0> 21 <tr><td></td></tr> 22 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> 23 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a0">~OsclTCPSocket</a> ()</td></tr> 24 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32 </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a1">Close</a> ()</td></tr> 25 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32 </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a2">Bind</a> (<a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &aAddress)</td></tr> 26 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a3">BindAsync</a> (<a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &aAddress, int32 aTimeoutMsec=(-1))</td></tr> 27 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a4">CancelBind</a> ()</td></tr> 28 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32 </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a5">Listen</a> (int32 aQueueSize)</td></tr> 29 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a6">ListenAsync</a> (int32 aQueueSize, int32 aTimeoutMsec=(-1))</td></tr> 30 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a7">CancelListen</a> ()</td></tr> 31 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OsclTCPSocket * </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a8">GetAcceptedSocketL</a> (uint32 aId)</td></tr> 32 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint8 * </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a9">GetRecvData</a> (int32 *aLength)</td></tr> 33 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint8 * </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a10">GetSendData</a> (int32 *aLength)</td></tr> 34 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a11">Connect</a> (<a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &aAddress, int32 aTimeoutMsec=-1)</td></tr> 35 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a12">CancelConnect</a> ()</td></tr> 36 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a13">Shutdown</a> (<a class="el" href="oscl__socket__types_8h.html#a21">TPVSocketShutdown</a> aHow, int32 aTimeoutMsec=-1)</td></tr> 37 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a14">CancelShutdown</a> ()</td></tr> 38 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a15">Accept</a> (int32 aTimeout=-1)</td></tr> 39 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a16">CancelAccept</a> ()</td></tr> 40 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a17">Send</a> (const uint8 *aPtr, uint32 aLen, int32 aTimeoutMsec=-1)</td></tr> 41 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a18">CancelSend</a> ()</td></tr> 42 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a19">Recv</a> (uint8 *aPtr, uint32 aMaxLen, int32 aTimeoutMsec=-1)</td></tr> 43 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#a20">CancelRecv</a> ()</td></tr> 44 <tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr> 45 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OsclTCPSocket * </td><td valign=bottom><a class="el" href="classOsclTCPSocket.html#d0">NewL</a> (<a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &alloc, <a class="el" href="classOsclSocketServ.html">OsclSocketServ</a> &aServ, <a class="el" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver, uint32 aId)</td></tr> 46 </table> 47 <hr><a name="_details"></a><h2>Detailed Description</h2> 48 The TCP Socket class 49 <p> 50 <hr><h2>Constructor & Destructor Documentation</h2> 51 <a name="a0" doxytag="OsclTCPSocket::~OsclTCPSocket"></a><p> 52 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 53 <tr> 54 <td class="md"> 55 <table cellpadding="0" cellspacing="0" border="0"> 56 <tr> 57 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OsclTCPSocket::~OsclTCPSocket </td> 58 <td class="md" valign="top">( </td> 59 <td class="mdname1" valign="top" nowrap> </td> 60 <td class="md" valign="top">) </td> 61 <td class="md" nowrap></td> 62 </tr> 63 64 </table> 65 </td> 66 </tr> 67 </table> 68 <table cellspacing=5 cellpadding=0 border=0> 69 <tr> 70 <td> 71 72 </td> 73 <td> 74 75 <p> 76 Destructor. The object must be deleted using the same allocator used in the NewL call. </td> 77 </tr> 78 </table> 79 <hr><h2>Member Function Documentation</h2> 80 <a name="a15" doxytag="OsclTCPSocket::Accept"></a><p> 81 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 82 <tr> 83 <td class="md"> 84 <table cellpadding="0" cellspacing="0" border="0"> 85 <tr> 86 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::Accept </td> 87 <td class="md" valign="top">( </td> 88 <td class="md" nowrap valign="top">int32 </td> 89 <td class="mdname1" valign="top" nowrap> <em>aTimeout</em> = -1 </td> 90 <td class="md" valign="top">) </td> 91 <td class="md" nowrap></td> 92 </tr> 93 94 </table> 95 </td> 96 </tr> 97 </table> 98 <table cellspacing=5 cellpadding=0 border=0> 99 <tr> 100 <td> 101 102 </td> 103 <td> 104 105 <p> 106 Accept incoming connections. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 107 <table border=0 cellspacing=2 cellpadding=0> 108 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 109 Timeout in milliseconds, or (-1) for infinite wait. </td></tr> 110 </table> 111 </dl><dl compact><dt><b>Returns: </b></dt><dd> 112 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 113 </tr> 114 </table> 115 <a name="a2" doxytag="OsclTCPSocket::Bind"></a><p> 116 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 117 <tr> 118 <td class="md"> 119 <table cellpadding="0" cellspacing="0" border="0"> 120 <tr> 121 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclTCPSocket::Bind </td> 122 <td class="md" valign="top">( </td> 123 <td class="md" nowrap valign="top"><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> & </td> 124 <td class="mdname1" valign="top" nowrap> <em>aAddress</em> </td> 125 <td class="md" valign="top">) </td> 126 <td class="md" nowrap></td> 127 </tr> 128 129 </table> 130 </td> 131 </tr> 132 </table> 133 <table cellspacing=5 cellpadding=0 border=0> 134 <tr> 135 <td> 136 137 </td> 138 <td> 139 140 <p> 141 Bind a TCP socket to an address. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 142 <table border=0 cellspacing=2 cellpadding=0> 143 <tr><td valign=top><em>aAddress:</em> </td><td> 144 Bind address. </td></tr> 145 </table> 146 </dl><dl compact><dt><b>Returns: </b></dt><dd> 147 Returns OsclErrNone for success, or a platform-specific error code. </dl> </td> 148 </tr> 149 </table> 150 <a name="a3" doxytag="OsclTCPSocket::BindAsync"></a><p> 151 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 152 <tr> 153 <td class="md"> 154 <table cellpadding="0" cellspacing="0" border="0"> 155 <tr> 156 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::BindAsync </td> 157 <td class="md" valign="top">( </td> 158 <td class="md" nowrap valign="top"><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> & </td> 159 <td class="mdname" nowrap> <em>aAddress</em>, </td> 160 </tr> 161 <tr> 162 <td></td> 163 <td></td> 164 <td class="md" nowrap>int32 </td> 165 <td class="mdname" nowrap> <em>aTimeoutMsec</em> = (-1)</td> 166 </tr> 167 <tr> 168 <td></td> 169 <td class="md">) </td> 170 <td class="md" colspan="2"></td> 171 </tr> 172 173 </table> 174 </td> 175 </tr> 176 </table> 177 <table cellspacing=5 cellpadding=0 border=0> 178 <tr> 179 <td> 180 181 </td> 182 <td> 183 184 <p> 185 Bind a TCP socket to an address. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 186 <table border=0 cellspacing=2 cellpadding=0> 187 <tr><td valign=top><em>aAddress:</em> </td><td> 188 Bind address. </td></tr> 189 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 190 Optional timeout. Use a negative value for infinite wait. </td></tr> 191 </table> 192 </dl><dl compact><dt><b>Returns: </b></dt><dd> 193 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 194 </tr> 195 </table> 196 <a name="a16" doxytag="OsclTCPSocket::CancelAccept"></a><p> 197 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 198 <tr> 199 <td class="md"> 200 <table cellpadding="0" cellspacing="0" border="0"> 201 <tr> 202 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelAccept </td> 203 <td class="md" valign="top">( </td> 204 <td class="mdname1" valign="top" nowrap> </td> 205 <td class="md" valign="top">) </td> 206 <td class="md" nowrap></td> 207 </tr> 208 209 </table> 210 </td> 211 </tr> 212 </table> 213 <table cellspacing=5 cellpadding=0 border=0> 214 <tr> 215 <td> 216 217 </td> 218 <td> 219 220 <p> 221 Cancel Accept 222 <p> 223 This method will cancel any pending Accept operation on the current socket, causing the Accept to complete with error EPVSocketCancel. If there is no pending Accept operation, this method will have no effect. </td> 224 </tr> 225 </table> 226 <a name="a4" doxytag="OsclTCPSocket::CancelBind"></a><p> 227 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 228 <tr> 229 <td class="md"> 230 <table cellpadding="0" cellspacing="0" border="0"> 231 <tr> 232 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelBind </td> 233 <td class="md" valign="top">( </td> 234 <td class="mdname1" valign="top" nowrap> </td> 235 <td class="md" valign="top">) </td> 236 <td class="md" nowrap></td> 237 </tr> 238 239 </table> 240 </td> 241 </tr> 242 </table> 243 <table cellspacing=5 cellpadding=0 border=0> 244 <tr> 245 <td> 246 247 </td> 248 <td> 249 250 <p> 251 Cancel Bind 252 <p> 253 This method will cancel any pending BindAsync operation on the current socket, causing the BindAsync to complete with error EPVSocketCancel. If there is no pending BindAsync operation, this method will have no effect. </td> 254 </tr> 255 </table> 256 <a name="a12" doxytag="OsclTCPSocket::CancelConnect"></a><p> 257 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 258 <tr> 259 <td class="md"> 260 <table cellpadding="0" cellspacing="0" border="0"> 261 <tr> 262 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelConnect </td> 263 <td class="md" valign="top">( </td> 264 <td class="mdname1" valign="top" nowrap> </td> 265 <td class="md" valign="top">) </td> 266 <td class="md" nowrap></td> 267 </tr> 268 269 </table> 270 </td> 271 </tr> 272 </table> 273 <table cellspacing=5 cellpadding=0 border=0> 274 <tr> 275 <td> 276 277 </td> 278 <td> 279 280 <p> 281 Cancel Connect 282 <p> 283 This method will cancel any pending Connect operation on the current socket, causing the Connect to complete with error EPVSocketCancel. If there is no pending Connect operation, this method will have no effect. </td> 284 </tr> 285 </table> 286 <a name="a7" doxytag="OsclTCPSocket::CancelListen"></a><p> 287 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 288 <tr> 289 <td class="md"> 290 <table cellpadding="0" cellspacing="0" border="0"> 291 <tr> 292 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelListen </td> 293 <td class="md" valign="top">( </td> 294 <td class="mdname1" valign="top" nowrap> </td> 295 <td class="md" valign="top">) </td> 296 <td class="md" nowrap></td> 297 </tr> 298 299 </table> 300 </td> 301 </tr> 302 </table> 303 <table cellspacing=5 cellpadding=0 border=0> 304 <tr> 305 <td> 306 307 </td> 308 <td> 309 310 <p> 311 Cancel Async Listen 312 <p> 313 This method will cancel any pending ListenAsync operation on the current socket, causing the Listen to complete with error EPVSocketCancel. If there is no pending Listen operation, this method will have no effect. </td> 314 </tr> 315 </table> 316 <a name="a20" doxytag="OsclTCPSocket::CancelRecv"></a><p> 317 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 318 <tr> 319 <td class="md"> 320 <table cellpadding="0" cellspacing="0" border="0"> 321 <tr> 322 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelRecv </td> 323 <td class="md" valign="top">( </td> 324 <td class="mdname1" valign="top" nowrap> </td> 325 <td class="md" valign="top">) </td> 326 <td class="md" nowrap></td> 327 </tr> 328 329 </table> 330 </td> 331 </tr> 332 </table> 333 <table cellspacing=5 cellpadding=0 border=0> 334 <tr> 335 <td> 336 337 </td> 338 <td> 339 340 <p> 341 Cancel Recv 342 <p> 343 This method will cancel any pending Recv operation on the current socket, causing the Recv to complete with error EPVSocketCancel. If there is no pending Recv operation, this method will have no effect. </td> 344 </tr> 345 </table> 346 <a name="a18" doxytag="OsclTCPSocket::CancelSend"></a><p> 347 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 348 <tr> 349 <td class="md"> 350 <table cellpadding="0" cellspacing="0" border="0"> 351 <tr> 352 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelSend </td> 353 <td class="md" valign="top">( </td> 354 <td class="mdname1" valign="top" nowrap> </td> 355 <td class="md" valign="top">) </td> 356 <td class="md" nowrap></td> 357 </tr> 358 359 </table> 360 </td> 361 </tr> 362 </table> 363 <table cellspacing=5 cellpadding=0 border=0> 364 <tr> 365 <td> 366 367 </td> 368 <td> 369 370 <p> 371 Cancel Send 372 <p> 373 This method will cancel any pending Send operation on the current socket, causing the Send to complete with error EPVSocketCancel. If there is no pending Send operation, this method will have no effect. </td> 374 </tr> 375 </table> 376 <a name="a14" doxytag="OsclTCPSocket::CancelShutdown"></a><p> 377 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 378 <tr> 379 <td class="md"> 380 <table cellpadding="0" cellspacing="0" border="0"> 381 <tr> 382 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclTCPSocket::CancelShutdown </td> 383 <td class="md" valign="top">( </td> 384 <td class="mdname1" valign="top" nowrap> </td> 385 <td class="md" valign="top">) </td> 386 <td class="md" nowrap></td> 387 </tr> 388 389 </table> 390 </td> 391 </tr> 392 </table> 393 <table cellspacing=5 cellpadding=0 border=0> 394 <tr> 395 <td> 396 397 </td> 398 <td> 399 400 <p> 401 Cancel Shutdown 402 <p> 403 This method will cancel any pending Shutdown operation on the current socket, causing the Shutdown to complete with error EPVSocketCancel. If there is no pending Shutdown operation, this method will have no effect. </td> 404 </tr> 405 </table> 406 <a name="a1" doxytag="OsclTCPSocket::Close"></a><p> 407 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 408 <tr> 409 <td class="md"> 410 <table cellpadding="0" cellspacing="0" border="0"> 411 <tr> 412 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclTCPSocket::Close </td> 413 <td class="md" valign="top">( </td> 414 <td class="mdname1" valign="top" nowrap> </td> 415 <td class="md" valign="top">) </td> 416 <td class="md" nowrap></td> 417 </tr> 418 419 </table> 420 </td> 421 </tr> 422 </table> 423 <table cellspacing=5 cellpadding=0 border=0> 424 <tr> 425 <td> 426 427 </td> 428 <td> 429 430 <p> 431 Close a TCP socket. This is a synchronous method. 432 <p> 433 Once it is closed a socket cannot be re-opened. Sockets are automatically closed when they are deleted. This method may be used to see any error code returned from the platform's socket close call. <dl compact><dt><b>Returns: </b></dt><dd> 434 Returns OsclErrNone for success, or a platform-specific error code. </dl> </td> 435 </tr> 436 </table> 437 <a name="a11" doxytag="OsclTCPSocket::Connect"></a><p> 438 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 439 <tr> 440 <td class="md"> 441 <table cellpadding="0" cellspacing="0" border="0"> 442 <tr> 443 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::Connect </td> 444 <td class="md" valign="top">( </td> 445 <td class="md" nowrap valign="top"><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> & </td> 446 <td class="mdname" nowrap> <em>aAddress</em>, </td> 447 </tr> 448 <tr> 449 <td></td> 450 <td></td> 451 <td class="md" nowrap>int32 </td> 452 <td class="mdname" nowrap> <em>aTimeoutMsec</em> = -1</td> 453 </tr> 454 <tr> 455 <td></td> 456 <td class="md">) </td> 457 <td class="md" colspan="2"></td> 458 </tr> 459 460 </table> 461 </td> 462 </tr> 463 </table> 464 <table cellspacing=5 cellpadding=0 border=0> 465 <tr> 466 <td> 467 468 </td> 469 <td> 470 471 <p> 472 Connect to an address. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 473 <table border=0 cellspacing=2 cellpadding=0> 474 <tr><td valign=top><em>aAddress:</em> </td><td> 475 a network address. </td></tr> 476 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 477 Timeout in milliseconds, or (-1) for infinite wait. </td></tr> 478 </table> 479 </dl><dl compact><dt><b>Returns: </b></dt><dd> 480 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 481 </tr> 482 </table> 483 <a name="a8" doxytag="OsclTCPSocket::GetAcceptedSocketL"></a><p> 484 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 485 <tr> 486 <td class="md"> 487 <table cellpadding="0" cellspacing="0" border="0"> 488 <tr> 489 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OsclTCPSocket* OsclTCPSocket::GetAcceptedSocketL </td> 490 <td class="md" valign="top">( </td> 491 <td class="md" nowrap valign="top">uint32 </td> 492 <td class="mdname1" valign="top" nowrap> <em>aId</em> </td> 493 <td class="md" valign="top">) </td> 494 <td class="md" nowrap></td> 495 </tr> 496 497 </table> 498 </td> 499 </tr> 500 </table> 501 <table cellspacing=5 cellpadding=0 border=0> 502 <tr> 503 <td> 504 505 </td> 506 <td> 507 508 <p> 509 Retrieve the accept socket after a successful Accept operation. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 510 <table border=0 cellspacing=2 cellpadding=0> 511 <tr><td valign=top><em>aId:</em> </td><td> 512 Socket ID. The caller must assign an ID to each socket. The ID is used to identify the socket in observer callbacks. </td></tr> 513 </table> 514 </dl><dl compact><dt><b>Returns: </b></dt><dd> 515 Returns pointer to socket, or NULL if error. Note: The caller is reponsible for deleting any accepted socket that it retrieves. </dl> </td> 516 </tr> 517 </table> 518 <a name="a9" doxytag="OsclTCPSocket::GetRecvData"></a><p> 519 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 520 <tr> 521 <td class="md"> 522 <table cellpadding="0" cellspacing="0" border="0"> 523 <tr> 524 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint8* OsclTCPSocket::GetRecvData </td> 525 <td class="md" valign="top">( </td> 526 <td class="md" nowrap valign="top">int32 * </td> 527 <td class="mdname1" valign="top" nowrap> <em>aLength</em> </td> 528 <td class="md" valign="top">) </td> 529 <td class="md" nowrap></td> 530 </tr> 531 532 </table> 533 </td> 534 </tr> 535 </table> 536 <table cellspacing=5 cellpadding=0 border=0> 537 <tr> 538 <td> 539 540 </td> 541 <td> 542 543 <p> 544 Retrieve the received data after a successful Recv operation. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 545 <table border=0 cellspacing=2 cellpadding=0> 546 <tr><td valign=top><em>aLength:</em> </td><td> 547 (output) number of bytes of data received. </td></tr> 548 </table> 549 </dl><dl compact><dt><b>Returns: </b></dt><dd> 550 Returns pointer to received data, or NULL if none. </dl> </td> 551 </tr> 552 </table> 553 <a name="a10" doxytag="OsclTCPSocket::GetSendData"></a><p> 554 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 555 <tr> 556 <td class="md"> 557 <table cellpadding="0" cellspacing="0" border="0"> 558 <tr> 559 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint8* OsclTCPSocket::GetSendData </td> 560 <td class="md" valign="top">( </td> 561 <td class="md" nowrap valign="top">int32 * </td> 562 <td class="mdname1" valign="top" nowrap> <em>aLength</em> </td> 563 <td class="md" valign="top">) </td> 564 <td class="md" nowrap></td> 565 </tr> 566 567 </table> 568 </td> 569 </tr> 570 </table> 571 <table cellspacing=5 cellpadding=0 border=0> 572 <tr> 573 <td> 574 575 </td> 576 <td> 577 578 <p> 579 Retrieve the sent data after a successful Send operation. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 580 <table border=0 cellspacing=2 cellpadding=0> 581 <tr><td valign=top><em>aLength:</em> </td><td> 582 (output) number of bytes of data sent. </td></tr> 583 </table> 584 </dl><dl compact><dt><b>Returns: </b></dt><dd> 585 Returns pointer to sent data, or NULL if none. </dl> </td> 586 </tr> 587 </table> 588 <a name="a5" doxytag="OsclTCPSocket::Listen"></a><p> 589 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 590 <tr> 591 <td class="md"> 592 <table cellpadding="0" cellspacing="0" border="0"> 593 <tr> 594 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclTCPSocket::Listen </td> 595 <td class="md" valign="top">( </td> 596 <td class="md" nowrap valign="top">int32 </td> 597 <td class="mdname1" valign="top" nowrap> <em>aQueueSize</em> </td> 598 <td class="md" valign="top">) </td> 599 <td class="md" nowrap></td> 600 </tr> 601 602 </table> 603 </td> 604 </tr> 605 </table> 606 <table cellspacing=5 cellpadding=0 border=0> 607 <tr> 608 <td> 609 610 </td> 611 <td> 612 613 <p> 614 Listen. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 615 <table border=0 cellspacing=2 cellpadding=0> 616 <tr><td valign=top><em>aQueueSize:</em> </td><td> 617 Queue size. </td></tr> 618 </table> 619 </dl><dl compact><dt><b>Returns: </b></dt><dd> 620 Returns OsclErrNone for success, or a platform-specific error code. </dl> </td> 621 </tr> 622 </table> 623 <a name="a6" doxytag="OsclTCPSocket::ListenAsync"></a><p> 624 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 625 <tr> 626 <td class="md"> 627 <table cellpadding="0" cellspacing="0" border="0"> 628 <tr> 629 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::ListenAsync </td> 630 <td class="md" valign="top">( </td> 631 <td class="md" nowrap valign="top">int32 </td> 632 <td class="mdname" nowrap> <em>aQueueSize</em>, </td> 633 </tr> 634 <tr> 635 <td></td> 636 <td></td> 637 <td class="md" nowrap>int32 </td> 638 <td class="mdname" nowrap> <em>aTimeoutMsec</em> = (-1)</td> 639 </tr> 640 <tr> 641 <td></td> 642 <td class="md">) </td> 643 <td class="md" colspan="2"></td> 644 </tr> 645 646 </table> 647 </td> 648 </tr> 649 </table> 650 <table cellspacing=5 cellpadding=0 border=0> 651 <tr> 652 <td> 653 654 </td> 655 <td> 656 657 <p> 658 ListenAsync This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 659 <table border=0 cellspacing=2 cellpadding=0> 660 <tr><td valign=top><em>aQueueSize:</em> </td><td> 661 Queue size. </td></tr> 662 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 663 Optional timeout. Use a negative value for infinite wait. </td></tr> 664 </table> 665 </dl><dl compact><dt><b>Returns: </b></dt><dd> 666 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 667 </tr> 668 </table> 669 <a name="d0" doxytag="OsclTCPSocket::NewL"></a><p> 670 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 671 <tr> 672 <td class="md"> 673 <table cellpadding="0" cellspacing="0" border="0"> 674 <tr> 675 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OsclTCPSocket* OsclTCPSocket::NewL </td> 676 <td class="md" valign="top">( </td> 677 <td class="md" nowrap valign="top"><a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> & </td> 678 <td class="mdname" nowrap> <em>alloc</em>, </td> 679 </tr> 680 <tr> 681 <td></td> 682 <td></td> 683 <td class="md" nowrap><a class="el" href="classOsclSocketServ.html">OsclSocketServ</a> & </td> 684 <td class="mdname" nowrap> <em>aServ</em>, </td> 685 </tr> 686 <tr> 687 <td></td> 688 <td></td> 689 <td class="md" nowrap><a class="el" href="classOsclSocketObserver.html">OsclSocketObserver</a> * </td> 690 <td class="mdname" nowrap> <em>aObserver</em>, </td> 691 </tr> 692 <tr> 693 <td></td> 694 <td></td> 695 <td class="md" nowrap>uint32 </td> 696 <td class="mdname" nowrap> <em>aId</em></td> 697 </tr> 698 <tr> 699 <td></td> 700 <td class="md">) </td> 701 <td class="md" colspan="2"><code> [static]</code></td> 702 </tr> 703 704 </table> 705 </td> 706 </tr> 707 </table> 708 <table cellspacing=5 cellpadding=0 border=0> 709 <tr> 710 <td> 711 712 </td> 713 <td> 714 715 <p> 716 Create a TCP Socket. May leave if failure.<dl compact><dt><b>Parameters: </b></dt><dd> 717 <table border=0 cellspacing=2 cellpadding=0> 718 <tr><td valign=top><em>alloc:</em> </td><td> 719 Memory allocator. </td></tr> 720 <tr><td valign=top><em>aServ:</em> </td><td> 721 Socket server. Must be connected. </td></tr> 722 <tr><td valign=top><em>aObserver:</em> </td><td> 723 Socket observer. </td></tr> 724 <tr><td valign=top><em>aId:</em> </td><td> 725 Socket ID. The caller must assign an ID to each socket. The ID is used to identify the socket in observer callbacks. </td></tr> 726 </table> 727 </dl><dl compact><dt><b>Returns: </b></dt><dd> 728 Returns pointer to socket. </dl> </td> 729 </tr> 730 </table> 731 <a name="a19" doxytag="OsclTCPSocket::Recv"></a><p> 732 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 733 <tr> 734 <td class="md"> 735 <table cellpadding="0" cellspacing="0" border="0"> 736 <tr> 737 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::Recv </td> 738 <td class="md" valign="top">( </td> 739 <td class="md" nowrap valign="top">uint8 * </td> 740 <td class="mdname" nowrap> <em>aPtr</em>, </td> 741 </tr> 742 <tr> 743 <td></td> 744 <td></td> 745 <td class="md" nowrap>uint32 </td> 746 <td class="mdname" nowrap> <em>aMaxLen</em>, </td> 747 </tr> 748 <tr> 749 <td></td> 750 <td></td> 751 <td class="md" nowrap>int32 </td> 752 <td class="mdname" nowrap> <em>aTimeoutMsec</em> = -1</td> 753 </tr> 754 <tr> 755 <td></td> 756 <td class="md">) </td> 757 <td class="md" colspan="2"></td> 758 </tr> 759 760 </table> 761 </td> 762 </tr> 763 </table> 764 <table cellspacing=5 cellpadding=0 border=0> 765 <tr> 766 <td> 767 768 </td> 769 <td> 770 771 <p> 772 Receive Data. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 773 <table border=0 cellspacing=2 cellpadding=0> 774 <tr><td valign=top><em>aPtr:</em> </td><td> 775 Buffer for received data. </td></tr> 776 <tr><td valign=top><em>aMaxLen:</em> </td><td> 777 Length of buffer. </td></tr> 778 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 779 Timeout in milliseconds, or (-1) for infinite wait. </td></tr> 780 </table> 781 </dl><dl compact><dt><b>Returns: </b></dt><dd> 782 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 783 </tr> 784 </table> 785 <a name="a17" doxytag="OsclTCPSocket::Send"></a><p> 786 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 787 <tr> 788 <td class="md"> 789 <table cellpadding="0" cellspacing="0" border="0"> 790 <tr> 791 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::Send </td> 792 <td class="md" valign="top">( </td> 793 <td class="md" nowrap valign="top">const uint8 * </td> 794 <td class="mdname" nowrap> <em>aPtr</em>, </td> 795 </tr> 796 <tr> 797 <td></td> 798 <td></td> 799 <td class="md" nowrap>uint32 </td> 800 <td class="mdname" nowrap> <em>aLen</em>, </td> 801 </tr> 802 <tr> 803 <td></td> 804 <td></td> 805 <td class="md" nowrap>int32 </td> 806 <td class="mdname" nowrap> <em>aTimeoutMsec</em> = -1</td> 807 </tr> 808 <tr> 809 <td></td> 810 <td class="md">) </td> 811 <td class="md" colspan="2"></td> 812 </tr> 813 814 </table> 815 </td> 816 </tr> 817 </table> 818 <table cellspacing=5 cellpadding=0 border=0> 819 <tr> 820 <td> 821 822 </td> 823 <td> 824 825 <p> 826 Send Data. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 827 <table border=0 cellspacing=2 cellpadding=0> 828 <tr><td valign=top><em>aPtr:</em> </td><td> 829 Data to send. </td></tr> 830 <tr><td valign=top><em>aLen:</em> </td><td> 831 Length of data to send. </td></tr> 832 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 833 Timeout in milliseconds, or (-1) for infinite wait. </td></tr> 834 </table> 835 </dl><dl compact><dt><b>Returns: </b></dt><dd> 836 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 837 </tr> 838 </table> 839 <a name="a13" doxytag="OsclTCPSocket::Shutdown"></a><p> 840 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 841 <tr> 842 <td class="md"> 843 <table cellpadding="0" cellspacing="0" border="0"> 844 <tr> 845 <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclTCPSocket::Shutdown </td> 846 <td class="md" valign="top">( </td> 847 <td class="md" nowrap valign="top"><a class="el" href="oscl__socket__types_8h.html#a21">TPVSocketShutdown</a> </td> 848 <td class="mdname" nowrap> <em>aHow</em>, </td> 849 </tr> 850 <tr> 851 <td></td> 852 <td></td> 853 <td class="md" nowrap>int32 </td> 854 <td class="mdname" nowrap> <em>aTimeoutMsec</em> = -1</td> 855 </tr> 856 <tr> 857 <td></td> 858 <td class="md">) </td> 859 <td class="md" colspan="2"></td> 860 </tr> 861 862 </table> 863 </td> 864 </tr> 865 </table> 866 <table cellspacing=5 cellpadding=0 border=0> 867 <tr> 868 <td> 869 870 </td> 871 <td> 872 873 <p> 874 Shutdown a socket. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd> 875 <table border=0 cellspacing=2 cellpadding=0> 876 <tr><td valign=top><em>aHow:</em> </td><td> 877 type of shutdown </td></tr> 878 <tr><td valign=top><em>aTimeoutMsec:</em> </td><td> 879 Timeout in milliseconds, or (-1) for infinite wait. </td></tr> 880 </table> 881 </dl><dl compact><dt><b>Returns: </b></dt><dd> 882 Will return EPVSocketPending if successful. When the operation is complete, a callback to the observer will occur with the completion status. If the operation cannot be initiated, the call will return EPVSocketFailure and there will be no callback. </dl> </td> 883 </tr> 884 </table> 885 <hr>The documentation for this class was generated from the following file:<ul> 886 <li><a class="el" href="oscl__socket_8h-source.html">oscl_socket.h</a></ul> 887 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 888 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 889 </small></address> 890 </body> 891 </html> 892