Home | History | Annotate | Download | only in oscl_html
      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>OsclUDPSocket 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> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
      9 <hr><h1>OsclUDPSocket Class Reference<br>
     10 <small>
     11 [<a class="el" href="group__osclio.html">OSCL IO</a>]</small>
     12 </h1><code>#include &lt;<a class="el" href="oscl__socket_8h-source.html">oscl_socket.h</a>&gt;</code>
     13 <p>
     14 <p>Inheritance diagram for OsclUDPSocket:
     15 <p><center><img src="classOsclUDPSocket.png" usemap="#OsclUDPSocket_map" border="0" alt=""></center>
     16 <map name="OsclUDPSocket_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&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a0">~OsclUDPSocket</a> ()</td></tr>
     24 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a1">Close</a> ()</td></tr>
     25 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a2">Bind</a> (<a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;aAddress)</td></tr>
     26 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a3">Join</a> (<a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;aAddress)</td></tr>
     27 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a>&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a4">BindAsync</a> (<a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;aAddress, int32 aTimeoutMsec=(-1))</td></tr>
     28 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a5">CancelBind</a> ()</td></tr>
     29 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint8 *&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a6">GetRecvData</a> (int32 *aLength)</td></tr>
     30 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF uint8 *&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a7">GetSendData</a> (int32 *aLength)</td></tr>
     31 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a>&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a8">SendTo</a> (const uint8 *aPtr, uint32 aLen, <a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;aAddress, int32 aTimeoutMsec=-1)</td></tr>
     32 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a9">CancelSendTo</a> ()</td></tr>
     33 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a>&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a10">RecvFrom</a> (uint8 *aPtr, uint32 aMaxLen, <a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;aAddress, int32 aTimeoutMsec=-1, uint32 aMultiRecvLimit=0, <a class="el" href="classOscl__Vector.html">Oscl_Vector</a>&lt; uint32, <a class="el" href="classOsclMemAllocator.html">OsclMemAllocator</a> &gt; *aPacketLen=NULL, <a class="el" href="classOscl__Vector.html">Oscl_Vector</a>&lt; <a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>, <a class="el" href="classOsclMemAllocator.html">OsclMemAllocator</a> &gt; *aPacketSource=NULL)</td></tr>
     34 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF void&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a11">CancelRecvFrom</a> ()</td></tr>
     35 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF int32&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#a12">SetRecvBufferSize</a> (uint32 size)</td></tr>
     36 <tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr>
     37 <tr><td nowrap align=right valign=top>OSCL_IMPORT_REF OsclUDPSocket *&nbsp;</td><td valign=bottom><a class="el" href="classOsclUDPSocket.html#d0">NewL</a> (<a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;alloc, <a class="el" href="classOsclSocketServ.html">OsclSocketServ</a> &amp;aServ, <a class="el" href="classOsclSocketObserver.html">OsclSocketObserver</a> *aObserver, uint32 aId)</td></tr>
     38 </table>
     39 <hr><a name="_details"></a><h2>Detailed Description</h2>
     40 The UDP Socket class 
     41 <p>
     42 <hr><h2>Constructor &amp; Destructor Documentation</h2>
     43 <a name="a0" doxytag="OsclUDPSocket::~OsclUDPSocket"></a><p>
     44 <table width="100%" cellpadding="2" cellspacing="0" border="0">
     45   <tr>
     46     <td class="md">
     47       <table cellpadding="0" cellspacing="0" border="0">
     48         <tr>
     49           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OsclUDPSocket::~OsclUDPSocket </td>
     50           <td class="md" valign="top">(&nbsp;</td>
     51           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
     52           <td class="md" valign="top">)&nbsp;</td>
     53           <td class="md" nowrap></td>
     54         </tr>
     55 
     56       </table>
     57     </td>
     58   </tr>
     59 </table>
     60 <table cellspacing=5 cellpadding=0 border=0>
     61   <tr>
     62     <td>
     63       &nbsp;
     64     </td>
     65     <td>
     66 
     67 <p>
     68 Destructor. The object must be deleted using the same allocator used in the NewL call.     </td>
     69   </tr>
     70 </table>
     71 <hr><h2>Member Function Documentation</h2>
     72 <a name="a2" doxytag="OsclUDPSocket::Bind"></a><p>
     73 <table width="100%" cellpadding="2" cellspacing="0" border="0">
     74   <tr>
     75     <td class="md">
     76       <table cellpadding="0" cellspacing="0" border="0">
     77         <tr>
     78           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclUDPSocket::Bind </td>
     79           <td class="md" valign="top">(&nbsp;</td>
     80           <td class="md" nowrap valign="top"><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;&nbsp;</td>
     81           <td class="mdname1" valign="top" nowrap>&nbsp; <em>aAddress</em>          </td>
     82           <td class="md" valign="top">)&nbsp;</td>
     83           <td class="md" nowrap></td>
     84         </tr>
     85 
     86       </table>
     87     </td>
     88   </tr>
     89 </table>
     90 <table cellspacing=5 cellpadding=0 border=0>
     91   <tr>
     92     <td>
     93       &nbsp;
     94     </td>
     95     <td>
     96 
     97 <p>
     98 Bind a UDP socket to an address. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
     99 <table border=0 cellspacing=2 cellpadding=0>
    100 <tr><td valign=top><em>aAddress:</em>&nbsp;</td><td>
    101 Bind address. </td></tr>
    102 </table>
    103 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    104 Returns OsclErrNone for success, or a platform-specific error code. </dl>    </td>
    105   </tr>
    106 </table>
    107 <a name="a4" doxytag="OsclUDPSocket::BindAsync"></a><p>
    108 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    109   <tr>
    110     <td class="md">
    111       <table cellpadding="0" cellspacing="0" border="0">
    112         <tr>
    113           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclUDPSocket::BindAsync </td>
    114           <td class="md" valign="top">(&nbsp;</td>
    115           <td class="md" nowrap valign="top"><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;&nbsp;</td>
    116           <td class="mdname" nowrap>&nbsp; <em>aAddress</em>, </td>
    117         </tr>
    118         <tr>
    119           <td></td>
    120           <td></td>
    121           <td class="md" nowrap>int32&nbsp;</td>
    122           <td class="mdname" nowrap>&nbsp; <em>aTimeoutMsec</em> = (-1)</td>
    123         </tr>
    124         <tr>
    125           <td></td>
    126           <td class="md">)&nbsp;</td>
    127           <td class="md" colspan="2"></td>
    128         </tr>
    129 
    130       </table>
    131     </td>
    132   </tr>
    133 </table>
    134 <table cellspacing=5 cellpadding=0 border=0>
    135   <tr>
    136     <td>
    137       &nbsp;
    138     </td>
    139     <td>
    140 
    141 <p>
    142 Bind a UDP socket to an address. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
    143 <table border=0 cellspacing=2 cellpadding=0>
    144 <tr><td valign=top><em>aAddress:</em>&nbsp;</td><td>
    145 Bind address. </td></tr>
    146 <tr><td valign=top><em>aTimeoutMsec:</em>&nbsp;</td><td>
    147 Optional timeout. Use a negative value for infinite wait. </td></tr>
    148 </table>
    149 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    150 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>
    151   </tr>
    152 </table>
    153 <a name="a5" doxytag="OsclUDPSocket::CancelBind"></a><p>
    154 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    155   <tr>
    156     <td class="md">
    157       <table cellpadding="0" cellspacing="0" border="0">
    158         <tr>
    159           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclUDPSocket::CancelBind </td>
    160           <td class="md" valign="top">(&nbsp;</td>
    161           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
    162           <td class="md" valign="top">)&nbsp;</td>
    163           <td class="md" nowrap></td>
    164         </tr>
    165 
    166       </table>
    167     </td>
    168   </tr>
    169 </table>
    170 <table cellspacing=5 cellpadding=0 border=0>
    171   <tr>
    172     <td>
    173       &nbsp;
    174     </td>
    175     <td>
    176 
    177 <p>
    178 Cancel Bind
    179 <p>
    180 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>
    181   </tr>
    182 </table>
    183 <a name="a11" doxytag="OsclUDPSocket::CancelRecvFrom"></a><p>
    184 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    185   <tr>
    186     <td class="md">
    187       <table cellpadding="0" cellspacing="0" border="0">
    188         <tr>
    189           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclUDPSocket::CancelRecvFrom </td>
    190           <td class="md" valign="top">(&nbsp;</td>
    191           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
    192           <td class="md" valign="top">)&nbsp;</td>
    193           <td class="md" nowrap></td>
    194         </tr>
    195 
    196       </table>
    197     </td>
    198   </tr>
    199 </table>
    200 <table cellspacing=5 cellpadding=0 border=0>
    201   <tr>
    202     <td>
    203       &nbsp;
    204     </td>
    205     <td>
    206 
    207 <p>
    208 Cancel RecvFrom
    209 <p>
    210 This method will cancel any pending RecvFrom operation on the current socket, causing the RecvFrom to complete with error EPVSocketCancel. If there is no pending RecvFrom operation, this method will have no effect.     </td>
    211   </tr>
    212 </table>
    213 <a name="a9" doxytag="OsclUDPSocket::CancelSendTo"></a><p>
    214 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    215   <tr>
    216     <td class="md">
    217       <table cellpadding="0" cellspacing="0" border="0">
    218         <tr>
    219           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF void OsclUDPSocket::CancelSendTo </td>
    220           <td class="md" valign="top">(&nbsp;</td>
    221           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
    222           <td class="md" valign="top">)&nbsp;</td>
    223           <td class="md" nowrap></td>
    224         </tr>
    225 
    226       </table>
    227     </td>
    228   </tr>
    229 </table>
    230 <table cellspacing=5 cellpadding=0 border=0>
    231   <tr>
    232     <td>
    233       &nbsp;
    234     </td>
    235     <td>
    236 
    237 <p>
    238 Cancel SendTo
    239 <p>
    240 This method will cancel any pending SendTo operation on the current socket, causing the SendTo to complete with error EPVSocketCancel. If there is no pending SendTo operation, this method will have no effect.     </td>
    241   </tr>
    242 </table>
    243 <a name="a1" doxytag="OsclUDPSocket::Close"></a><p>
    244 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    245   <tr>
    246     <td class="md">
    247       <table cellpadding="0" cellspacing="0" border="0">
    248         <tr>
    249           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclUDPSocket::Close </td>
    250           <td class="md" valign="top">(&nbsp;</td>
    251           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
    252           <td class="md" valign="top">)&nbsp;</td>
    253           <td class="md" nowrap></td>
    254         </tr>
    255 
    256       </table>
    257     </td>
    258   </tr>
    259 </table>
    260 <table cellspacing=5 cellpadding=0 border=0>
    261   <tr>
    262     <td>
    263       &nbsp;
    264     </td>
    265     <td>
    266 
    267 <p>
    268 Close a UDP socket. This is a synchronous method.
    269 <p>
    270 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>
    271 Returns OsclErrNone for success, or a platform-specific error code. </dl>    </td>
    272   </tr>
    273 </table>
    274 <a name="a6" doxytag="OsclUDPSocket::GetRecvData"></a><p>
    275 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    276   <tr>
    277     <td class="md">
    278       <table cellpadding="0" cellspacing="0" border="0">
    279         <tr>
    280           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint8* OsclUDPSocket::GetRecvData </td>
    281           <td class="md" valign="top">(&nbsp;</td>
    282           <td class="md" nowrap valign="top">int32 *&nbsp;</td>
    283           <td class="mdname1" valign="top" nowrap>&nbsp; <em>aLength</em>          </td>
    284           <td class="md" valign="top">)&nbsp;</td>
    285           <td class="md" nowrap></td>
    286         </tr>
    287 
    288       </table>
    289     </td>
    290   </tr>
    291 </table>
    292 <table cellspacing=5 cellpadding=0 border=0>
    293   <tr>
    294     <td>
    295       &nbsp;
    296     </td>
    297     <td>
    298 
    299 <p>
    300 Retrieve the received data after a successful RecvFrom operation. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
    301 <table border=0 cellspacing=2 cellpadding=0>
    302 <tr><td valign=top><em>aLength:</em>&nbsp;</td><td>
    303 (output) number of bytes of data received. </td></tr>
    304 </table>
    305 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    306 Returns pointer to received data, or NULL if none. </dl>    </td>
    307   </tr>
    308 </table>
    309 <a name="a7" doxytag="OsclUDPSocket::GetSendData"></a><p>
    310 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    311   <tr>
    312     <td class="md">
    313       <table cellpadding="0" cellspacing="0" border="0">
    314         <tr>
    315           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF uint8* OsclUDPSocket::GetSendData </td>
    316           <td class="md" valign="top">(&nbsp;</td>
    317           <td class="md" nowrap valign="top">int32 *&nbsp;</td>
    318           <td class="mdname1" valign="top" nowrap>&nbsp; <em>aLength</em>          </td>
    319           <td class="md" valign="top">)&nbsp;</td>
    320           <td class="md" nowrap></td>
    321         </tr>
    322 
    323       </table>
    324     </td>
    325   </tr>
    326 </table>
    327 <table cellspacing=5 cellpadding=0 border=0>
    328   <tr>
    329     <td>
    330       &nbsp;
    331     </td>
    332     <td>
    333 
    334 <p>
    335 Retrieve the sent data after a successful SendTo operation. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
    336 <table border=0 cellspacing=2 cellpadding=0>
    337 <tr><td valign=top><em>aLength:</em>&nbsp;</td><td>
    338 (output) number of bytes of data sent. </td></tr>
    339 </table>
    340 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    341 Returns pointer to sent data, or NULL if none. </dl>    </td>
    342   </tr>
    343 </table>
    344 <a name="a3" doxytag="OsclUDPSocket::Join"></a><p>
    345 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    346   <tr>
    347     <td class="md">
    348       <table cellpadding="0" cellspacing="0" border="0">
    349         <tr>
    350           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclUDPSocket::Join </td>
    351           <td class="md" valign="top">(&nbsp;</td>
    352           <td class="md" nowrap valign="top"><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;&nbsp;</td>
    353           <td class="mdname1" valign="top" nowrap>&nbsp; <em>aAddress</em>          </td>
    354           <td class="md" valign="top">)&nbsp;</td>
    355           <td class="md" nowrap></td>
    356         </tr>
    357 
    358       </table>
    359     </td>
    360   </tr>
    361 </table>
    362 <table cellspacing=5 cellpadding=0 border=0>
    363   <tr>
    364     <td>
    365       &nbsp;
    366     </td>
    367     <td>
    368 
    369 <p>
    370 Bind a UDP socket to an address and Join the multicast group. This is a synchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
    371 <table border=0 cellspacing=2 cellpadding=0>
    372 <tr><td valign=top><em>aAddress:</em>&nbsp;</td><td>
    373 Bind address. </td></tr>
    374 </table>
    375 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    376 Returns OsclErrNone for success, or a platform-specific error code. May throw an OsclErrNotSupported Exception </dl>    </td>
    377   </tr>
    378 </table>
    379 <a name="d0" doxytag="OsclUDPSocket::NewL"></a><p>
    380 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    381   <tr>
    382     <td class="md">
    383       <table cellpadding="0" cellspacing="0" border="0">
    384         <tr>
    385           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF OsclUDPSocket* OsclUDPSocket::NewL </td>
    386           <td class="md" valign="top">(&nbsp;</td>
    387           <td class="md" nowrap valign="top"><a class="el" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> &amp;&nbsp;</td>
    388           <td class="mdname" nowrap>&nbsp; <em>alloc</em>, </td>
    389         </tr>
    390         <tr>
    391           <td></td>
    392           <td></td>
    393           <td class="md" nowrap><a class="el" href="classOsclSocketServ.html">OsclSocketServ</a> &amp;&nbsp;</td>
    394           <td class="mdname" nowrap>&nbsp; <em>aServ</em>, </td>
    395         </tr>
    396         <tr>
    397           <td></td>
    398           <td></td>
    399           <td class="md" nowrap><a class="el" href="classOsclSocketObserver.html">OsclSocketObserver</a> *&nbsp;</td>
    400           <td class="mdname" nowrap>&nbsp; <em>aObserver</em>, </td>
    401         </tr>
    402         <tr>
    403           <td></td>
    404           <td></td>
    405           <td class="md" nowrap>uint32&nbsp;</td>
    406           <td class="mdname" nowrap>&nbsp; <em>aId</em></td>
    407         </tr>
    408         <tr>
    409           <td></td>
    410           <td class="md">)&nbsp;</td>
    411           <td class="md" colspan="2"><code> [static]</code></td>
    412         </tr>
    413 
    414       </table>
    415     </td>
    416   </tr>
    417 </table>
    418 <table cellspacing=5 cellpadding=0 border=0>
    419   <tr>
    420     <td>
    421       &nbsp;
    422     </td>
    423     <td>
    424 
    425 <p>
    426 Create a UDP Socket. May leave if failure.<dl compact><dt><b>Parameters: </b></dt><dd>
    427 <table border=0 cellspacing=2 cellpadding=0>
    428 <tr><td valign=top><em>alloc:</em>&nbsp;</td><td>
    429 Memory allocator. </td></tr>
    430 <tr><td valign=top><em>aServ:</em>&nbsp;</td><td>
    431 Socket server. Must be connected. </td></tr>
    432 <tr><td valign=top><em>aObserver:</em>&nbsp;</td><td>
    433 Socket observer. </td></tr>
    434 <tr><td valign=top><em>aId:</em>&nbsp;</td><td>
    435 Socket ID. The caller must assign an ID to each socket. The ID is used to identify the socket in observer callbacks. </td></tr>
    436 </table>
    437 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    438 Returns pointer to socket. </dl>    </td>
    439   </tr>
    440 </table>
    441 <a name="a10" doxytag="OsclUDPSocket::RecvFrom"></a><p>
    442 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    443   <tr>
    444     <td class="md">
    445       <table cellpadding="0" cellspacing="0" border="0">
    446         <tr>
    447           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclUDPSocket::RecvFrom </td>
    448           <td class="md" valign="top">(&nbsp;</td>
    449           <td class="md" nowrap valign="top">uint8 *&nbsp;</td>
    450           <td class="mdname" nowrap>&nbsp; <em>aPtr</em>, </td>
    451         </tr>
    452         <tr>
    453           <td></td>
    454           <td></td>
    455           <td class="md" nowrap>uint32&nbsp;</td>
    456           <td class="mdname" nowrap>&nbsp; <em>aMaxLen</em>, </td>
    457         </tr>
    458         <tr>
    459           <td></td>
    460           <td></td>
    461           <td class="md" nowrap><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;&nbsp;</td>
    462           <td class="mdname" nowrap>&nbsp; <em>aAddress</em>, </td>
    463         </tr>
    464         <tr>
    465           <td></td>
    466           <td></td>
    467           <td class="md" nowrap>int32&nbsp;</td>
    468           <td class="mdname" nowrap>&nbsp; <em>aTimeoutMsec</em> = -1, </td>
    469         </tr>
    470         <tr>
    471           <td></td>
    472           <td></td>
    473           <td class="md" nowrap>uint32&nbsp;</td>
    474           <td class="mdname" nowrap>&nbsp; <em>aMultiRecvLimit</em> = 0, </td>
    475         </tr>
    476         <tr>
    477           <td></td>
    478           <td></td>
    479           <td class="md" nowrap><a class="el" href="classOscl__Vector.html">Oscl_Vector</a>&lt; uint32, <a class="el" href="classOsclMemAllocator.html">OsclMemAllocator</a> &gt; *&nbsp;</td>
    480           <td class="mdname" nowrap>&nbsp; <em>aPacketLen</em> = NULL, </td>
    481         </tr>
    482         <tr>
    483           <td></td>
    484           <td></td>
    485           <td class="md" nowrap><a class="el" href="classOscl__Vector.html">Oscl_Vector</a>&lt; <a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>, <a class="el" href="classOsclMemAllocator.html">OsclMemAllocator</a> &gt; *&nbsp;</td>
    486           <td class="mdname" nowrap>&nbsp; <em>aPacketSource</em> = NULL</td>
    487         </tr>
    488         <tr>
    489           <td></td>
    490           <td class="md">)&nbsp;</td>
    491           <td class="md" colspan="2"></td>
    492         </tr>
    493 
    494       </table>
    495     </td>
    496   </tr>
    497 </table>
    498 <table cellspacing=5 cellpadding=0 border=0>
    499   <tr>
    500     <td>
    501       &nbsp;
    502     </td>
    503     <td>
    504 
    505 <p>
    506 Receive Data. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
    507 <table border=0 cellspacing=2 cellpadding=0>
    508 <tr><td valign=top><em>aPtr:</em>&nbsp;</td><td>
    509 Buffer to receive incoming data </td></tr>
    510 <tr><td valign=top><em>aMaxLen:</em>&nbsp;</td><td>
    511 Length of buffer. </td></tr>
    512 <tr><td valign=top><em>aAddress:</em>&nbsp;</td><td>
    513 (output) Source address. </td></tr>
    514 <tr><td valign=top><em>aTimeoutMsec:</em>&nbsp;</td><td>
    515 Timeout in milliseconds, or (-1) for infinite wait.</td></tr>
    516 <tr><td valign=top><em>aMultiRecvLimit</em>&nbsp;</td><td>
    517 (optional input): Configures multiple packet receive mode. As long as there are packets queued at the socket and at least aMultiRecvLimit bytes are available in the buffer, recvfrom operations will continue. A value of zero disabled multiple packet mode. The individual packet lengths can be retrieved in the aPacketLen parameter; and the individual packet source addresses can be retrieved in the aPacketSource parameter. </td></tr>
    518 <tr><td valign=top><em>aPacketLen:</em>&nbsp;</td><td>
    519 (optional output) a vector of packet lengths, in case multiple packets were received. </td></tr>
    520 <tr><td valign=top><em>aPacketSource:</em>&nbsp;</td><td>
    521 (optional output) a vector of source addresses, in case multiple packets were received.</td></tr>
    522 </table>
    523 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    524 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>
    525   </tr>
    526 </table>
    527 <a name="a8" doxytag="OsclUDPSocket::SendTo"></a><p>
    528 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    529   <tr>
    530     <td class="md">
    531       <table cellpadding="0" cellspacing="0" border="0">
    532         <tr>
    533           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF <a class="el" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> OsclUDPSocket::SendTo </td>
    534           <td class="md" valign="top">(&nbsp;</td>
    535           <td class="md" nowrap valign="top">const uint8 *&nbsp;</td>
    536           <td class="mdname" nowrap>&nbsp; <em>aPtr</em>, </td>
    537         </tr>
    538         <tr>
    539           <td></td>
    540           <td></td>
    541           <td class="md" nowrap>uint32&nbsp;</td>
    542           <td class="mdname" nowrap>&nbsp; <em>aLen</em>, </td>
    543         </tr>
    544         <tr>
    545           <td></td>
    546           <td></td>
    547           <td class="md" nowrap><a class="el" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> &amp;&nbsp;</td>
    548           <td class="mdname" nowrap>&nbsp; <em>aAddress</em>, </td>
    549         </tr>
    550         <tr>
    551           <td></td>
    552           <td></td>
    553           <td class="md" nowrap>int32&nbsp;</td>
    554           <td class="mdname" nowrap>&nbsp; <em>aTimeoutMsec</em> = -1</td>
    555         </tr>
    556         <tr>
    557           <td></td>
    558           <td class="md">)&nbsp;</td>
    559           <td class="md" colspan="2"></td>
    560         </tr>
    561 
    562       </table>
    563     </td>
    564   </tr>
    565 </table>
    566 <table cellspacing=5 cellpadding=0 border=0>
    567   <tr>
    568     <td>
    569       &nbsp;
    570     </td>
    571     <td>
    572 
    573 <p>
    574 Send Data. This is an asynchronous method.<dl compact><dt><b>Parameters: </b></dt><dd>
    575 <table border=0 cellspacing=2 cellpadding=0>
    576 <tr><td valign=top><em>aPtr:</em>&nbsp;</td><td>
    577 Data to send. </td></tr>
    578 <tr><td valign=top><em>aLen:</em>&nbsp;</td><td>
    579 Length of data to send. </td></tr>
    580 <tr><td valign=top><em>aAddress:</em>&nbsp;</td><td>
    581 Destination address. </td></tr>
    582 <tr><td valign=top><em>aTimeoutMsec:</em>&nbsp;</td><td>
    583 Timeout in milliseconds, or (-1) for infinite wait. </td></tr>
    584 </table>
    585 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    586 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>
    587   </tr>
    588 </table>
    589 <a name="a12" doxytag="OsclUDPSocket::SetRecvBufferSize"></a><p>
    590 <table width="100%" cellpadding="2" cellspacing="0" border="0">
    591   <tr>
    592     <td class="md">
    593       <table cellpadding="0" cellspacing="0" border="0">
    594         <tr>
    595           <td class="md" nowrap valign="top"> OSCL_IMPORT_REF int32 OsclUDPSocket::SetRecvBufferSize </td>
    596           <td class="md" valign="top">(&nbsp;</td>
    597           <td class="md" nowrap valign="top">uint32&nbsp;</td>
    598           <td class="mdname1" valign="top" nowrap>&nbsp; <em>size</em>          </td>
    599           <td class="md" valign="top">)&nbsp;</td>
    600           <td class="md" nowrap></td>
    601         </tr>
    602 
    603       </table>
    604     </td>
    605   </tr>
    606 </table>
    607 <table cellspacing=5 cellpadding=0 border=0>
    608   <tr>
    609     <td>
    610       &nbsp;
    611     </td>
    612     <td>
    613 
    614 <p>
    615 Set the buffer size of the socket This is a synchronous method. <dl compact><dt><b>Parameters: </b></dt><dd>
    616 <table border=0 cellspacing=2 cellpadding=0>
    617 <tr><td valign=top><em>size:</em>&nbsp;</td><td>
    618 buffer size </td></tr>
    619 </table>
    620 </dl><dl compact><dt><b>Returns: </b></dt><dd>
    621 Returns OsclErrNone for success, or a platform-specific error code. May throw an OsclErrNotSupported Exception. </dl>    </td>
    622   </tr>
    623 </table>
    624 <hr>The documentation for this class was generated from the following file:<ul>
    625 <li><a class="el" href="oscl__socket_8h-source.html">oscl_socket.h</a></ul>
    626 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
    627 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
    628 </small></address>
    629 </body>
    630 </html>
    631