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