aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/oscl__socket__serv__imp__reqlist_8h_source.html
blob: 70b1f5244698586d9b1b5855303e2beb27c7438b (plain)
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
<!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_socket_serv_imp_reqlist.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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>oscl_socket_serv_imp_reqlist.h</h1><a href="oscl__socket__serv__imp__reqlist_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_SOCKET_SERV_IMP_REQLIST_H_INCLUDED</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SOCKET_SERV_IMP_REQLIST_H_INCLUDED</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="oscl__socket__tuneables_8h.html">oscl_socket_tuneables.h</a>&quot;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<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>&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<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>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="oscl__mem_8h.html" title="This file contains basic memory definitions for common use across platforms.">oscl_mem.h</a>&quot;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="preprocessor">#if PV_SOCKET_SERVER_IS_THREAD</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__semaphore_8h.html" title="This file provides implementation of mutex.">oscl_semaphore.h</a>&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="oscl__mutex_8h.html" title="This file provides implementation of mutex.">oscl_mutex.h</a>&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#endif</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00015"></a>00015 <span class="keyword">class </span><a class="code" href="classOsclSocketServI.html">OsclSocketServI</a>;
<a name="l00016"></a>00016 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;<span class="keyword">class </span>OsclSocketQueue;
<a name="l00017"></a>00017 <span class="keyword">class </span><a class="code" href="classOsclSocketI.html">OsclSocketI</a>;
<a name="l00018"></a>00018 <span class="keyword">class </span>OsclSocketRequest;
<a name="l00019"></a>00019 
<a name="l00020"></a><a class="code" href="classOsclSocketServRequestQElem.html">00020</a> <span class="keyword">class </span><a class="code" href="classOsclSocketServRequestQElem.html">OsclSocketServRequestQElem</a>
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022     <span class="keyword">public</span>:
<a name="l00023"></a><a class="code" href="classOsclSocketServRequestQElem.html#ad8387589b7e0cb4e7d03118c8930cce6">00023</a>         <a class="code" href="classOsclSocketServRequestQElem.html#ad8387589b7e0cb4e7d03118c8930cce6">OsclSocketServRequestQElem</a>(OsclSocketRequest* r)
<a name="l00024"></a>00024                 : <a class="code" href="classOsclSocketServRequestQElem.html#aa63b5f768cb8afe5ad482a56bedea13a">iSocketRequest</a>(r)
<a name="l00025"></a>00025                 , <a class="code" href="classOsclSocketServRequestQElem.html#ad5547d0d32adf43ac933642cb4a74c4a">iSelect</a>(0)
<a name="l00026"></a>00026                 , <a class="code" href="classOsclSocketServRequestQElem.html#afe065475828ff0e00af99e8353e67591">iCancel</a>(false)
<a name="l00027"></a>00027         {}
<a name="l00028"></a>00028 
<a name="l00029"></a><a class="code" href="classOsclSocketServRequestQElem.html#aa63b5f768cb8afe5ad482a56bedea13a">00029</a>         OsclSocketRequest* <a class="code" href="classOsclSocketServRequestQElem.html#aa63b5f768cb8afe5ad482a56bedea13a">iSocketRequest</a>;
<a name="l00030"></a><a class="code" href="classOsclSocketServRequestQElem.html#ad5547d0d32adf43ac933642cb4a74c4a">00030</a>         uint8 <a class="code" href="classOsclSocketServRequestQElem.html#ad5547d0d32adf43ac933642cb4a74c4a">iSelect</a>;
<a name="l00031"></a><a class="code" href="classOsclSocketServRequestQElem.html#afe065475828ff0e00af99e8353e67591">00031</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclSocketServRequestQElem.html#afe065475828ff0e00af99e8353e67591">iCancel</a>;
<a name="l00032"></a>00032 };
<a name="l00033"></a>00033 
<a name="l00036"></a><a class="code" href="classOsclSocketServRequestList.html">00036</a> <span class="keyword">class </span><a class="code" href="classOsclSocketServRequestList.html">OsclSocketServRequestList</a>
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038     <span class="keyword">public</span>:
<a name="l00039"></a>00039         <a class="code" href="classOsclSocketServRequestList.html#ae4e7ffcc050f06c7ba4b942240316ded">OsclSocketServRequestList</a>();
<a name="l00040"></a>00040         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#a2ab8c1559c04a14d957379f84851f1a8">Add</a>(OsclSocketRequest *);
<a name="l00041"></a>00041         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#a613125c300faa63086fa1a88a6a11638">StartCancel</a>(OsclSocketRequest *);
<a name="l00042"></a>00042         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#a0ca14a3d417730733fc353a6d7bfd5e0">Open</a>(<a class="code" href="classOsclSocketServI.html">OsclSocketServI</a>*s);
<a name="l00043"></a>00043         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#a4c79a3632137cbf8a92e21d02bc9a283">Close</a>();
<a name="l00044"></a>00044         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#a707edd62d0a03d9aa95057d6bc9d54ea">Wakeup</a>();
<a name="l00045"></a>00045         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#a5347f7df333c0b4a2488e2339b412988">WaitOnRequests</a>();
<a name="l00046"></a><a class="code" href="classOsclSocketServRequestList.html#aa312a2789d1ed701145b38fd58dfed47">00046</a>         <span class="keywordtype">void</span> <a class="code" href="classOsclSocketServRequestList.html#aa312a2789d1ed701145b38fd58dfed47">Remove</a>(<a class="code" href="classOsclSocketServRequestQElem.html">OsclSocketServRequestQElem</a>* aElem)
<a name="l00047"></a>00047         {
<a name="l00048"></a>00048             aElem-&gt;<a class="code" href="classOsclSocketServRequestQElem.html#aa63b5f768cb8afe5ad482a56bedea13a">iSocketRequest</a> = <a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>;
<a name="l00049"></a>00049         }
<a name="l00050"></a>00050 
<a name="l00051"></a>00051     <span class="keyword">private</span>:
<a name="l00052"></a>00052         <span class="comment">//a queue of the active sockets.</span>
<a name="l00053"></a>00053         <a class="code" href="classOscl__Vector.html">Oscl_Vector&lt;OsclSocketServRequestQElem, OsclMemAllocator&gt;</a> iActiveRequests;
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="preprocessor">#if PV_SOCKET_SERVER_IS_THREAD</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>        <span class="comment">//thread protection</span>
<a name="l00057"></a>00057         <a class="code" href="classOsclMutex.html">OsclMutex</a> iCrit;
<a name="l00058"></a>00058         <a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> iSem;
<a name="l00059"></a>00059 <span class="preprocessor">#endif</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a>00061         <a class="code" href="classOsclSocketServI.html">OsclSocketServI</a> *iContainer;
<a name="l00062"></a>00062 
<a name="l00063"></a>00063         <span class="comment">//input queues for requests from the app side.  requests</span>
<a name="l00064"></a>00064         <span class="comment">//are picked up by server thread, so these queues need</span>
<a name="l00065"></a>00065         <span class="comment">//to be used with thread locks.</span>
<a name="l00066"></a>00066         <a class="code" href="classOscl__Vector.html">Oscl_Vector&lt;OsclSocketRequest*, OsclMemAllocator&gt;</a> iAddRequests;
<a name="l00067"></a>00067         <a class="code" href="classOscl__Vector.html">Oscl_Vector&lt;OsclSocketRequest*, OsclMemAllocator&gt;</a> iCancelRequests;
<a name="l00068"></a>00068         <span class="keywordtype">void</span> GetNewRequests();
<a name="l00069"></a>00069         <span class="keywordtype">void</span> Lock();
<a name="l00070"></a>00070         <span class="keywordtype">void</span> Unlock();
<a name="l00071"></a>00071 
<a name="l00072"></a><a class="code" href="classOsclSocketServRequestList.html#af9362100c32f524273ddcd74f21e6361">00072</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclSocketServI.html">OsclSocketServI</a>;
<a name="l00073"></a>00073 };
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 
</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.002.1.1 </small>
</small></address>
</body>
</html>