http://git-wip-us.apache.org/repos/asf/mesos-site/blob/09fd0301/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp.html b/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp.html index d0e3575..2e842c7 100644 --- a/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp.html +++ b/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp.html @@ -65,7 +65,7 @@ <code>#include <<a class="el" href="defer_8hpp_source.html">process/defer.hpp</a>></code><br /> <code>#include <<a class="el" href="future_8hpp_source.html">process/future.hpp</a>></code><br /> <code>#include <<a class="el" href="reap_8hpp_source.html">process/reap.hpp</a>></code><br /> -<code>#include <<a class="el" href="subprocess_8hpp_source.html">process/subprocess.hpp</a>></code><br /> +<code>#include <<a class="el" href="include_2process_2subprocess_8hpp_source.html">process/subprocess.hpp</a>></code><br /> <code>#include <<a class="el" href="libprocess_2include_2process_2process_8hpp_source.html">process/process.hpp</a>></code><br /> <code>#include <glog/logging.h></code><br /> </div>
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/09fd0301/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp_source.html b/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp_source.html index 6d422ec..da77d47 100644 --- a/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp_source.html +++ b/content/api/latest/c++/libprocess_2include_2process_2windows_2jobobject_8hpp_source.html @@ -52,13 +52,13 @@ <div class="title">jobobject.hpp</div> </div> </div><!--header--> <div class="contents"> -<a href="libprocess_2include_2process_2windows_2jobobject_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License</span></div><div class="line"><a name="l00012"></a><span class="line no"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __PROCESS_WINDOWS_JOBOBJECT_HPP__</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define __PROCESS_WINDOWS_JOBOBJECT_HPP__</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <<a class="code" href="lambda_8hpp.html">stout/lambda.hpp</a>></span></div><div clas s="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>></span> <span class="comment">// For `SharedHandle`.</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="stout_2include_2stout_2os_2windows_2jobobject_8hpp.html">stout/os/windows/jobobject.hpp</a>></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#inclu de <<a class="code" href="defer_8hpp.html">process/defer.hpp</a>></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="future_8hpp.html">process/future.hpp</a>></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="reap_8hpp.html">process/reap.hpp</a>></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="subprocess_8hpp.html">process/subprocess.hpp</a>></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="code" href="libprocess_2include_2process_2process_8hpp.html">process/process.hpp</a>></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <glog/logging.h></span> <span class="comment">// For `CHECK` macro.</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">namespace </span><a class="code" href="namespaceprocess.html">process</a> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">namespace </span><a class="code" href="namespaceinternal.html">internal</a> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html"> 37</a></span> <span class="keyword">class </s pan><a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html">JobObjectManager</a> : <span class="keyword">public</span> <a class="code" href="classprocess_1_1Process.html">Process</a><JobObjectManager></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html#abbd61e261fe0c9111f2df8af27f8f465"> 40</a></span>  <a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#abbd61e261fe0c9111f2df8af27f8f465">JobObjectManager</a>() : <a class="code" href="classprocess_1_1ProcessBase.html">ProcessBase</a>(<span class="stringliteral">"__job_object_manager"</span>) {}</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classproc ess_1_1internal_1_1JobObjectManager.html#a1d7ed88d58a332060514091e8a7385d3"> 41</a></span>  <span class="keyword">virtual</span> <a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#a1d7ed88d58a332060514091e8a7385d3">~JobObjectManager</a>() {}</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html#a96b0d960771d03b6682b20fd9f6142ea"> 43</a></span>  <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#a96b0d960771d03b6682b20fd9f6142ea">manage</a>(</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">const</span> <a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid,</div><div class="line"><a name="l00045"></ a><span class="lineno"> 45</span>  <span class="keyword">const</span> std::wstring& <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>,</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">const</span> <a class="code" href="classSharedHandle.html">SharedHandle</a>& handle)</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  jobs.emplace(pid, JobData{<a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>, handle});</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="code" href="namespaceprocess.html#a8225ae5aa1b4963bb8413312282a91be">process::reap</a>(pid)</div><div class="line"><a na me="l00051"></a><span class="lineno"> 51</span>  .<a class="code" href="classprocess_1_1Future.html#a71bde220aed3c725cef2040f63adf42a">onAny</a>(<a class="code" href="namespaceprocess.html#a8b27a2ef76eb133bf0ce7a5eea4fb77c">defer</a>(<span class="keyword">self</span>(), &<a class="code" href="namespacecgroups.html#a12d210f286e5fcf7993c0c90b9459606">Self::cleanup</a>, lambda::_1, pid));</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html#adc672b14adbfe22f390c518457d60b2b"> 55</a></span>  <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1internal_1_1JobObjectManag er.html#adc672b14adbfe22f390c518457d60b2b">cleanup</a>(<a class="code" href="classprocess_1_1Future.html">Future</a><<a class="code" href="classOption.html">Option<int></a>> exit_code, <span class="keyword">const</span> <a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  CHECK(!exit_code.isPending());</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  CHECK(!exit_code.isDiscarded());</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="classTry.html">Try<Nothing></a> killJobResult = <a class="code" href="namespaceos.html#a8181969d159a69d91d1e265f1bb1ed dc">os::kill_job</a>(jobs.at(pid).handle);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  CHECK(!killJobResult.isError())</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  << <span class="stringliteral">"Failed to kill job object: "</span> << killJobResult.error();</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">// Finally, erase the `JobData`, closing the last handle to the job object.</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">// All functionality requiring a live job object handle (but possibly a</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// dead process) must happen prior to this, e.g. in a ano ther parent hook.</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  jobs.erase(pid);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keyword">struct </span>JobData {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  std::wstring <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classSharedHandle.html">SharedHandle</a> handle;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  };</div>< div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  std::map<pid_t, JobData> jobs;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> };</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment">// Global job object manager process. Defined in `process.cpp`.</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">extern</span> <a class="code" href="structprocess_1_1PID.html">PID<JobObjectManager></a> <a class="code" href="namespaceprocess_1_1internal.html#a05a2591dfe6a59e00bad2a5c9b6c8db3">job_object_manager</a>;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span cl ass="lineno"> 82</span> } <span class="comment">// namespace internal {</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">inline</span> <a class="code" href="structprocess_1_1Subprocess_1_1ParentHook.html">Subprocess::ParentHook</a> Subprocess::ParentHook::CREATE_JOB() {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordflow">return</span> <a class="code" href="structprocess_1_1Subprocess_1_1ParentHook.html">Subprocess::ParentHook</a>([](<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid) -> <a class="code" href="classTry.html">Try<Nothing></a> {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">// NOTE: There are two very important parts to this hook. First, Windows</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// does not have a process hierarchy in the same sense that Unix does, so</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="comment">// in order to be able to kill a task, we have to put it in a job object.</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// Then, when we terminate the job object, it will terminate all the</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// processes in the task (including any processes that were subsequently</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="comment">// created by any process in this task). Second, the lifetime of the job</span></div><div class="line "><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// object is greater than the lifetime of the processes it contains. Thus</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="comment">// the job object handle is explicitly owned by the global job object</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">// manager process.</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classTry.html">Try<std::wstring></a> <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a> = <a class="code" href="namespaceos.html#a4c477c8086d4b3004c170ee05e5be9bf">os::name_job</a>(pid);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">if</span> (name.<a class="code" href="classTry.htm l#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(name.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">// This creates a named job object in the Windows kernel.</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="comment">// This handle must remain in scope (and open) until</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// a running process is assigned to it.</span></di v><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <a class="code" href="classTry.html">Try<SharedHandle></a> handle = <a class="code" href="namespaceos.html#a88a1637a0168d78faad2ac5b82e5cc4d">os::create_job</a>(name.<a class="code" href="classTry.html#a8bc7f43e75a47111ea18e9c83b007be5">get</a>());</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">if</span> (handle.isError()) {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(handle.error());</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// This actually assigns the process `pid` to the job object.</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="classTry.html">Try<Nothing></a> result = <a class="code" href="namespaceos.html#a706dc9d1287978f358a9a23b77037fb0">os::assign_job</a>(handle.get(), pid);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">if</span> (result.isError()) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(result.error());</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="comment">// Save the handle to the job object to ensure the object remains</span></d iv><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="comment">// open for the entire lifetime of the agent process, and is closed</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// when the process is reaped.</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="code" href="namespaceprocess_1_1internal.html#ac34bccdf47fcfa46cedf2a03771eb221">dispatch</a>(</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="namespaceprocess_1_1internal.html#a05a2591dfe6a59e00bad2a5c9b6c8db3">process::internal::job_object_manager</a>,</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  &<a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#a96b0d960771d03b6682b20fd9f6142ea">process::internal::JobObjectManager::manage</a>,</di v><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  pid,</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  name.<a class="code" href="classTry.html#a8bc7f43e75a47111ea18e9c83b007be5">get</a>(),</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  handle.get());</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">return</span> <a class="code" href="structNothing.html">Nothing</a>();</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  });</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> }</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> } <span class="co mment">// namespace process {</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="preprocessor">#endif // __PROCESS_WINDOWS_JOBOBJECT_HPP__</span></div><div class="ttc" id="structNothing_html"><div class="ttname"><a href="structNothing.html">Nothing</a></div><div class="ttdef"><b>Definition:</b> nothing.hpp:16</div></div> +<a href="libprocess_2include_2process_2windows_2jobobject_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License</span></div><div class="line"><a name="l00012"></a><span class="line no"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __PROCESS_WINDOWS_JOBOBJECT_HPP__</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define __PROCESS_WINDOWS_JOBOBJECT_HPP__</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <<a class="code" href="lambda_8hpp.html">stout/lambda.hpp</a>></span></div><div clas s="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>></span> <span class="comment">// For `SharedHandle`.</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="stout_2include_2stout_2os_2windows_2jobobject_8hpp.html">stout/os/windows/jobobject.hpp</a>></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#inclu de <<a class="code" href="defer_8hpp.html">process/defer.hpp</a>></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="future_8hpp.html">process/future.hpp</a>></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="reap_8hpp.html">process/reap.hpp</a>></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="include_2process_2subprocess_8hpp.html">process/subprocess.hpp</a>></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="code" href="libprocess_2include_2process_2process_8hpp.html">process/process.hpp</a>></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span > </div><div class="line"><a name="l00031"></a><span class="lineno"> >31</span> <span class="preprocessor">#include ><glog/logging.h></span> <span class="comment">// For `CHECK` >macro.</span></div><div class="line"><a name="l00032"></a><span >class="lineno"> 32</span> </div><div class="line"><a >name="l00033"></a><span class="lineno"> 33</span> </div><div >class="line"><a name="l00034"></a><span class="lineno"> >34</span> <span class="keyword">namespace </span><a class="code" >href="namespaceprocess.html">process</a> {</div><div class="line"><a >name="l00035"></a><span class="lineno"> 35</span> <span >class="keyword">namespace </span><a class="code" >href="namespaceinternal.html">internal</a> {</div><div class="line"><a >name="l00036"></a><span class="lineno"> 36</span> </div><div >class="line"><a name="l00037"></a><span class="lineno"><a class="line" >href="classprocess_1_1internal_1_1JobObjectManager.html"> >37</a></span> <span class=" keyword">class </span><a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html">JobObjectManager</a> : <span class="keyword">public</span> <a class="code" href="classprocess_1_1Process.html">Process</a><JobObjectManager></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html#abbd61e261fe0c9111f2df8af27f8f465"> 40</a></span>  <a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#abbd61e261fe0c9111f2df8af27f8f465">JobObjectManager</a>() : <a class="code" href="classprocess_1_1ProcessBase.html">ProcessBase</a>(<span class="stringliteral">"__job_object_manager"</span>) {}</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="lin e" href="classprocess_1_1internal_1_1JobObjectManager.html#a1d7ed88d58a332060514091e8a7385d3"> 41</a></span>  <span class="keyword">virtual</span> <a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#a1d7ed88d58a332060514091e8a7385d3">~JobObjectManager</a>() {}</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html#a96b0d960771d03b6682b20fd9f6142ea"> 43</a></span>  <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#a96b0d960771d03b6682b20fd9f6142ea">manage</a>(</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">const</span> <a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid,</div><div class="line">< a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">const</span> std::wstring& <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>,</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">const</span> <a class="code" href="classSharedHandle.html">SharedHandle</a>& handle)</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  jobs.emplace(pid, JobData{<a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>, handle});</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="code" href="namespaceprocess.html#a8225ae5aa1b4963bb8413312282a91be">process::reap</a>(pid)</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  .<a class="code" href="classprocess_1_1Future.html#a71bde220aed3c725cef2040f63adf42a">onAny</a>(<a class="code" href="namespaceprocess.html#a8b27a2ef76eb133bf0ce7a5eea4fb77c">defer</a>(<span class="keyword">self</span>(), &<a class="code" href="namespacecgroups.html#a12d210f286e5fcf7993c0c90b9459606">Self::cleanup</a>, lambda::_1, pid));</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classprocess_1_1internal_1_1JobObjectManager.html#adc672b14adbfe22f390c518457d60b2b"> 55</a></span>  <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1internal _1_1JobObjectManager.html#adc672b14adbfe22f390c518457d60b2b">cleanup</a>(<a class="code" href="classprocess_1_1Future.html">Future</a><<a class="code" href="classOption.html">Option<int></a>> exit_code, <span class="keyword">const</span> <a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  CHECK(!exit_code.isPending());</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  CHECK(!exit_code.isDiscarded());</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="classTry.html">Try<Nothing></a> killJobResult = <a class="code" href="namespaceos.html#a8181969d159a 69d91d1e265f1bb1eddc">os::kill_job</a>(jobs.at(pid).handle);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  CHECK(!killJobResult.isError())</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  << <span class="stringliteral">"Failed to kill job object: "</span> << killJobResult.error();</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">// Finally, erase the `JobData`, closing the last handle to the job object.</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">// All functionality requiring a live job object handle (but possibly a</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// dead process) must happen prior to t his, e.g. in a another parent hook.</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  jobs.erase(pid);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keyword">struct </span>JobData {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  std::wstring <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a>;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classSharedHandle.html">SharedHandle</a> handle;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span >  };</div><div class="line"><a name="l00075"></a><span class="lineno"> > 75</span> </div><div class="line"><a name="l00076"></a><span >class="lineno"> 76</span>  std::map<pid_t, JobData> >jobs;</div><div class="line"><a name="l00077"></a><span class="lineno"> >77</span> };</div><div class="line"><a name="l00078"></a><span >class="lineno"> 78</span> </div><div class="line"><a >name="l00079"></a><span class="lineno"> 79</span> <span >class="comment">// Global job object manager process. Defined in >`process.cpp`.</span></div><div class="line"><a name="l00080"></a><span >class="lineno"> 80</span> <span class="keyword">extern</span> <a >class="code" href="structprocess_1_1PID.html">PID<JobObjectManager></a> ><a class="code" >href="namespaceprocess_1_1internal.html#a05a2591dfe6a59e00bad2a5c9b6c8db3">job_object_manager</a>;</div><div > class="line"><a name="l00081"></a><span class="lineno"> >81</span> </div><div class="line"><a name="l0 0082"></a><span class="lineno"> 82</span> } <span class="comment">// namespace internal {</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">inline</span> <a class="code" href="structprocess_1_1Subprocess_1_1ParentHook.html">Subprocess::ParentHook</a> Subprocess::ParentHook::CREATE_JOB() {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordflow">return</span> <a class="code" href="structprocess_1_1Subprocess_1_1ParentHook.html">Subprocess::ParentHook</a>([](<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html#ab03ced250ed239bc3b50b669493997f9">pid_t</a> pid) -> <a class="code" href="classTry.html">Try<Nothing></a> {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">// NOTE: There are two very i mportant parts to this hook. First, Windows</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// does not have a process hierarchy in the same sense that Unix does, so</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="comment">// in order to be able to kill a task, we have to put it in a job object.</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// Then, when we terminate the job object, it will terminate all the</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// processes in the task (including any processes that were subsequently</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="comment">// created by any process in this task). Second, the lifetime of the job</span></di v><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// object is greater than the lifetime of the processes it contains. Thus</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="comment">// the job object handle is explicitly owned by the global job object</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">// manager process.</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classTry.html">Try<std::wstring></a> <a class="code" href="namespaceos_1_1Shell.html#acfe16ef2b1146ad49a8651c0a457ce46">name</a> = <a class="code" href="namespaceos.html#a4c477c8086d4b3004c170ee05e5be9bf">os::name_job</a>(pid);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">if</span> (name.<a class="code" href="classTry.html#a0b98f95163b8a38daafd1651b043a276">isError</a>()) {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(name.<a class="code" href="classTry.html#aec4a11ddd3c036e889d90b7eb6258ba7">error</a>());</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">// This creates a named job object in the Windows kernel.</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="comment">// This handle must remain in scope (and open) until</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// a running process is assigned to it.</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <a class="code" href="classTry.html">Try<SharedHandle></a> handle = <a class="code" href="namespaceos.html#a88a1637a0168d78faad2ac5b82e5cc4d">os::create_job</a>(name.<a class="code" href="classTry.html#a8bc7f43e75a47111ea18e9c83b007be5">get</a>());</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">if</span> (handle.isError()) {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(handle.error());</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// This actually as signs the process `pid` to the job object.</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="classTry.html">Try<Nothing></a> result = <a class="code" href="namespaceos.html#a706dc9d1287978f358a9a23b77037fb0">os::assign_job</a>(handle.get(), pid);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">if</span> (result.isError()) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">return</span> <a class="code" href="classError.html">Error</a>(result.error());</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="comment">// Save the handle to the job object to ensure the object remains</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="comment">// open for the entire lifetime of the agent process, and is closed</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// when the process is reaped.</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="code" href="namespaceprocess_1_1internal.html#ac34bccdf47fcfa46cedf2a03771eb221">dispatch</a>(</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="namespaceprocess_1_1internal.html#a05a2591dfe6a59e00bad2a5c9b6c8db3">process::internal::job_object_manager</a>,</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  &<a class="code" href="classprocess_1_1internal_1_1JobObjectManager.html#a96b0d960771d03b6682b20fd9f6142ea">process::internal::JobObjectManage r::manage</a>,</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  pid,</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  name.<a class="code" href="classTry.html#a8bc7f43e75a47111ea18e9c83b007be5">get</a>(),</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  handle.get());</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">return</span> <a class="code" href="structNothing.html">Nothing</a>();</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  });</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> }</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  ;} <span class="comment">// namespace process {</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="preprocessor">#endif // __PROCESS_WINDOWS_JOBOBJECT_HPP__</span></div><div class="ttc" id="structNothing_html"><div class="ttname"><a href="structNothing.html">Nothing</a></div><div class="ttdef"><b>Definition:</b> nothing.hpp:16</div></div> <div class="ttc" id="classError_html"><div class="ttname"><a href="classError.html">Error</a></div><div class="ttdef"><b>Definition:</b> errorbase.hpp:36</div></div> <div class="ttc" id="classOption_html"><div class="ttname"><a href="classOption.html">Option< int ></a></div></div> <div class="ttc" id="classTry_html_a8bc7f43e75a47111ea18e9c83b007be5"><div class="ttname"><a href="classTry.html#a8bc7f43e75a47111ea18e9c83b007be5">Try::get</a></div><div class="ttdeci">T & get()&</div><div class="ttdef"><b>Definition:</b> try.hpp:73</div></div> <div class="ttc" id="classSharedHandle_html"><div class="ttname"><a href="classSharedHandle.html">SharedHandle</a></div><div class="ttdef"><b>Definition:</b> windows.hpp:72</div></div> <div class="ttc" id="classTry_html"><div class="ttname"><a href="classTry.html">Try</a></div><div class="ttdef"><b>Definition:</b> check.hpp:33</div></div> -<div class="ttc" id="subprocess_8hpp_html"><div class="ttname"><a href="subprocess_8hpp.html">subprocess.hpp</a></div></div> +<div class="ttc" id="include_2process_2subprocess_8hpp_html"><div class="ttname"><a href="include_2process_2subprocess_8hpp.html">subprocess.hpp</a></div></div> <div class="ttc" id="namespacecgroups_html_a12d210f286e5fcf7993c0c90b9459606"><div class="ttname"><a href="namespacecgroups.html#a12d210f286e5fcf7993c0c90b9459606">cgroups::cleanup</a></div><div class="ttdeci">process::Future< bool > cleanup(const std::string &hierarchy)</div></div> <div class="ttc" id="classprocess_1_1internal_1_1JobObjectManager_html_adc672b14adbfe22f390c518457d60b2b"><div class="ttname"><a href="classprocess_1_1internal_1_1JobObjectManager.html#adc672b14adbfe22f390c518457d60b2b">process::internal::JobObjectManager::cleanup</a></div><div class="ttdeci">void cleanup(Future< Option< int >> exit_code, const pid_t pid)</div><div class="ttdef"><b>Definition:</b> jobobject.hpp:55</div></div> <div class="ttc" id="classprocess_1_1ProcessBase_html"><div class="ttname"><a href="classprocess_1_1ProcessBase.html">process::ProcessBase</a></div><div class="ttdef"><b>Definition:</b> process.hpp:72</div></div> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/09fd0301/content/api/latest/c++/libwinio_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/libwinio_8hpp.html b/content/api/latest/c++/libwinio_8hpp.html new file mode 100644 index 0000000..fd4dd7c --- /dev/null +++ b/content/api/latest/c++/libwinio_8hpp.html @@ -0,0 +1,105 @@ +<!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"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>Apache Mesos: 3rdparty/libprocess/src/windows/libwinio.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_01cbbd8dcbf9de3825992568658f467e.html">src</a></li><li class="navelem"><a class="el" href="dir_4f303781ded361ff602a549327c53cc9.html">windows</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> | +<a href="#namespaces">Namespaces</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">libwinio.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <<a class="el" href="lambda_8hpp_source.html">stout/lambda.hpp</a>></code><br /> +<code>#include <<a class="el" href="try_8hpp_source.html">stout/try.hpp</a>></code><br /> +<code>#include <<a class="el" href="3rdparty_2stout_2include_2stout_2windows_8hpp_source.html">stout/windows.hpp</a>></code><br /> +<code>#include <<a class="el" href="int__fd_8hpp_source.html">stout/os/int_fd.hpp</a>></code><br /> +<code>#include <<a class="el" href="address_8hpp_source.html">process/address.hpp</a>></code><br /> +<code>#include <<a class="el" href="future_8hpp_source.html">process/future.hpp</a>></code><br /> +</div> +<p><a href="libwinio_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1windows_1_1EventLoop.html">process::windows::EventLoop</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> +Namespaces</h2></td></tr> +<tr class="memitem:namespaceprocess"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess.html">process</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespaceprocess_1_1windows"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html">process::windows</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a7436ed89e84ff3415987de0ca9428d08"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#a7436ed89e84ff3415987de0ca9428d08">process::windows::read</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, void *buf, size_t size)</td></tr> +<tr class="separator:a7436ed89e84ff3415987de0ca9428d08"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a69a29846581bb7bb1084e9ee90cbe8e6"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#a69a29846581bb7bb1084e9ee90cbe8e6">process::windows::write</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, const void *buf, size_t size)</td></tr> +<tr class="separator:a69a29846581bb7bb1084e9ee90cbe8e6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a37fde6f31c2f9838a18cf83c2c865134"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#a37fde6f31c2f9838a18cf83c2c865134">process::windows::recv</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, void *buf, size_t size)</td></tr> +<tr class="separator:a37fde6f31c2f9838a18cf83c2c865134"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a04c64346155d34517acdf8b587162868"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#a04c64346155d34517acdf8b587162868">process::windows::send</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, const void *buf, size_t size)</td></tr> +<tr class="separator:a04c64346155d34517acdf8b587162868"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a1f34e4ee3092afe93c37c170430c03f5"><td class="memItemLeft" align="right" valign="top">Future< <a class="el" href="structNothing.html">Nothing</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#a1f34e4ee3092afe93c37c170430c03f5">process::windows::accept</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &accepted_socket)</td></tr> +<tr class="separator:a1f34e4ee3092afe93c37c170430c03f5"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a5afdaeaeb57343d0aca728b74dcd3f71"><td class="memItemLeft" align="right" valign="top">Future< <a class="el" href="structNothing.html">Nothing</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#a5afdaeaeb57343d0aca728b74dcd3f71">process::windows::connect</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, const network::Address &address)</td></tr> +<tr class="separator:a5afdaeaeb57343d0aca728b74dcd3f71"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:afc59f27e725b5feb12f76e1c008ba767"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1windows.html#afc59f27e725b5feb12f76e1c008ba767">process::windows::sendfile</a> (const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &fd, const <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> &file_fd, off_t offset, size_t size)</td></tr> +<tr class="separator:afc59f27e725b5feb12f76e1c008ba767"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/09fd0301/content/api/latest/c++/libwinio_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/libwinio_8hpp_source.html b/content/api/latest/c++/libwinio_8hpp_source.html new file mode 100644 index 0000000..1d49099 --- /dev/null +++ b/content/api/latest/c++/libwinio_8hpp_source.html @@ -0,0 +1,91 @@ +<!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"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.11"/> +<title>Apache Mesos: 3rdparty/libprocess/src/windows/libwinio.hpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.11 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_01cbbd8dcbf9de3825992568658f467e.html">src</a></li><li class="navelem"><a class="el" href="dir_4f303781ded361ff602a549327c53cc9.html">windows</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">libwinio.hpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="libwinio_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</ span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class=" line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __LIBWINIO_HPP__</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define __LIBWINIO_HPP__</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <<a class="code" href="lambda_8hpp.html">stout/lambda.hpp</a>></span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <<a class="code" href="try_8hpp.html">stout/try.hpp</a>></span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>></span></div><div class="line"><a name=" l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <<a class="code" href="int__fd_8hpp.html">stout/os/int_fd.hpp</a>></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <<a class="code" href="address_8hpp.html">process/address.hpp</a>></span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="future_8hpp.html">process/future.hpp</a>></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">namespace </span><a class="code" href="namespaceprocess.html">process</a> {</ div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1windows.html"> 26</a></span> <span class="keyword">namespace </span>windows {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classprocess_1_1windows_1_1EventLoop.html"> 28</a></span> <span class="keyword">class </span><a class="code" href="classprocess_1_1windows_1_1EventLoop.html">EventLoop</a></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keyword">static</span> <a class="code" href="classTry.html">Try<EventLoop*></a> <a class="code" href="classprocess_1_1windows_1_1EventLoop.html#a3b d3da5d721cf2c4db9c5551bdccc3a4">create</a>();</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="comment">// Run the event loop forever.</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="classTry.html">Try<Nothing></a> <a class="code" href="classprocess_1_1windows_1_1EventLoop.html#a2578b5fad0eb039f995955c798310c86">run</a>();</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="comment">// Signal the event loop to stop.</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classTry.html">Try<Nothing></a> <a class="code" href="classprocess_1_1windows_1_1EventLoop.html#a8a07fc602e31875e6cbcaeac8 008f09a">stop</a>();</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="comment">// Timer event that calls the callback after the timer has fired.</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="classTry.html">Try<Nothing></a> <a class="code" href="classprocess_1_1windows_1_1EventLoop.html#a006cb0c8efb7aaadadf0a692d9c2659a">launchTimer</a>(</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">const</span> <a class="code" href="classDuration.html">Duration</a>& duration, <span class="keyword">const</span> lambda::function<<span class="keywordtype">void</span>()>& callback);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="l ineno"> 43</span>  <span class="comment">// Register a handle for async IO.</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="classTry.html">Try<Nothing></a> <a class="code" href="classprocess_1_1windows_1_1EventLoop.html#a832a73998bb3b26b7caa770ceef38827">registerHandle</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="classprocess_1_1windows_1_1EventLoop.html">EventLoop</a>(<a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a> iocp_handle);</div><div class= "line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="comment">// Custom Deleter for a RAII handle.</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keyword">struct </span>HandleDeleter</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">// `HANDLE` satisfies the C++ `NullablePointer` interface, since it's</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// a literal pointer. So we can use the `HANDLE` directly instead of</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// using a pointer to the `HANDLE`.</span></div><div class="line"><a nam e="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// See http://en.cppreference.com/w/cpp/memory/unique_ptr for more info.</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">typedef</span> <a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a> pointer;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordtype">void</span> operator()(<a class="code" href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">HANDLE</a> h) { ::CloseHandle(h); }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  };</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  std::unique_ptr<HANDLE, HandleDeleter> iocp_handle_;</ div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> };</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// All of these functions do an asynchronous IO operation. The returned future</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// can be discarded to cancel the operation.</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1windows.html#a7436ed89e84ff3415987de0ca9428d08">read</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span cl ass="keywordtype">void</span>* buf, <span class="keywordtype">size_t</span> <a class="code" href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">size</a>);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1windows.html#a69a29846581bb7bb1084e9ee90cbe8e6">write</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span class="keyword">const</span> <span class="keywordtype">void</span>* buf, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// Socket only functions.</span></div><d iv class="line"><a name="l00071"></a><span class="lineno"> 71</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1windows.html#a37fde6f31c2f9838a18cf83c2c865134">recv</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span class="keywordtype">void</span>* buf, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1windows.html#a04c64346155d34517acdf8b587162868">send</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span class="keyword">const</span> <span class="keywo rdtype">void</span>* buf, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="namespaceprocess_1_1windows.html#a1f34e4ee3092afe93c37c170430c03f5">accept</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& accepted_socket);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="namespaceprocess_1_1windows.html#a5afda eaeb57343d0aca728b74dcd3f71">connect</a>(<span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span class="keyword">const</span> <a class="code" href="classprocess_1_1network_1_1Address.html">network::Address</a>& <a class="code" href="namespaceprocess.html#afdecc57ab065ab5d354e728d0ef0ff34">address</a>);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1windows.html#afc59f27e725b5feb12f76e1c008ba767">sendfile</a>(</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keyword">const</span> <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& fd, <span class="keyword">const</span> <a class=" code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a>& file_fd, off_t offset, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> } <span class="comment">// namespace windows {</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> } <span class="comment">// namespace process {</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="preprocessor">#endif // __LIBWINIO_HPP__</span></div><div class="ttc" id="namespaceos_1_1stat_html_a7a116891923bc8b5d8c50f78da8657be"><div class="ttname"><a href="namespaceos_1_1stat.html#a7a116891923bc8b5d8c50f78da8657be">os::stat::size</a></div><div class="ttdeci">Try< Bytes > size(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)</div><div class="ttdef"><b>Definition:</b> stat.hpp:121</div></div> +<div class="ttc" id="address_8hpp_html"><div class="ttname"><a href="address_8hpp.html">address.hpp</a></div></div> +<div class="ttc" id="classTry_html"><div class="ttname"><a href="classTry.html">Try</a></div><div class="ttdef"><b>Definition:</b> check.hpp:33</div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_a1f34e4ee3092afe93c37c170430c03f5"><div class="ttname"><a href="namespaceprocess_1_1windows.html#a1f34e4ee3092afe93c37c170430c03f5">process::windows::accept</a></div><div class="ttdeci">Future< Nothing > accept(const int_fd &fd, const int_fd &accepted_socket)</div></div> +<div class="ttc" id="classprocess_1_1windows_1_1EventLoop_html_a832a73998bb3b26b7caa770ceef38827"><div class="ttname"><a href="classprocess_1_1windows_1_1EventLoop.html#a832a73998bb3b26b7caa770ceef38827">process::windows::EventLoop::registerHandle</a></div><div class="ttdeci">Try< Nothing > registerHandle(const int_fd &fd)</div></div> +<div class="ttc" id="classprocess_1_1network_1_1Address_html"><div class="ttname"><a href="classprocess_1_1network_1_1Address.html">process::network::Address</a></div><div class="ttdef"><b>Definition:</b> address.hpp:276</div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_afc59f27e725b5feb12f76e1c008ba767"><div class="ttname"><a href="namespaceprocess_1_1windows.html#afc59f27e725b5feb12f76e1c008ba767">process::windows::sendfile</a></div><div class="ttdeci">Future< size_t > sendfile(const int_fd &fd, const int_fd &file_fd, off_t offset, size_t size)</div><div class="ttdef"><b>Definition:</b> sendfile.hpp:58</div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_a37fde6f31c2f9838a18cf83c2c865134"><div class="ttname"><a href="namespaceprocess_1_1windows.html#a37fde6f31c2f9838a18cf83c2c865134">process::windows::recv</a></div><div class="ttdeci">Future< size_t > recv(const int_fd &fd, void *buf, size_t size)</div></div> +<div class="ttc" id="classprocess_1_1windows_1_1EventLoop_html_a3bd3da5d721cf2c4db9c5551bdccc3a4"><div class="ttname"><a href="classprocess_1_1windows_1_1EventLoop.html#a3bd3da5d721cf2c4db9c5551bdccc3a4">process::windows::EventLoop::create</a></div><div class="ttdeci">static Try< EventLoop * > create()</div></div> +<div class="ttc" id="3rdparty_2stout_2include_2stout_2windows_8hpp_html"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">windows.hpp</a></div></div> +<div class="ttc" id="classDuration_html"><div class="ttname"><a href="classDuration.html">Duration</a></div><div class="ttdef"><b>Definition:</b> duration.hpp:32</div></div> +<div class="ttc" id="classprocess_1_1windows_1_1EventLoop_html_a2578b5fad0eb039f995955c798310c86"><div class="ttname"><a href="classprocess_1_1windows_1_1EventLoop.html#a2578b5fad0eb039f995955c798310c86">process::windows::EventLoop::run</a></div><div class="ttdeci">Try< Nothing > run()</div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_a69a29846581bb7bb1084e9ee90cbe8e6"><div class="ttname"><a href="namespaceprocess_1_1windows.html#a69a29846581bb7bb1084e9ee90cbe8e6">process::windows::write</a></div><div class="ttdeci">Future< size_t > write(const int_fd &fd, const void *buf, size_t size)</div><div class="ttdef"><b>Definition:</b> write.hpp:72</div></div> +<div class="ttc" id="lambda_8hpp_html"><div class="ttname"><a href="lambda_8hpp.html">lambda.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1windows_1_1EventLoop_html_a006cb0c8efb7aaadadf0a692d9c2659a"><div class="ttname"><a href="classprocess_1_1windows_1_1EventLoop.html#a006cb0c8efb7aaadadf0a692d9c2659a">process::windows::EventLoop::launchTimer</a></div><div class="ttdeci">Try< Nothing > launchTimer(const Duration &duration, const lambda::function< void()> &callback)</div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_a7436ed89e84ff3415987de0ca9428d08"><div class="ttname"><a href="namespaceprocess_1_1windows.html#a7436ed89e84ff3415987de0ca9428d08">process::windows::read</a></div><div class="ttdeci">Future< size_t > read(const int_fd &fd, void *buf, size_t size)</div><div class="ttdef"><b>Definition:</b> read.hpp:83</div></div> +<div class="ttc" id="namespacerouting_1_1queueing_1_1ingress_html_a934208b6017d0a9aed90b6594bb8292f"><div class="ttname"><a href="namespacerouting_1_1queueing_1_1ingress.html#a934208b6017d0a9aed90b6594bb8292f">routing::queueing::ingress::HANDLE</a></div><div class="ttdeci">constexpr Handle HANDLE</div><div class="ttdef"><b>Definition:</b> ingress.hpp:37</div></div> +<div class="ttc" id="future_8hpp_html"><div class="ttname"><a href="future_8hpp.html">future.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_html"><div class="ttname"><a href="namespaceprocess.html">process</a></div><div class="ttdef"><b>Definition:</b> executor.hpp:48</div></div> +<div class="ttc" id="classprocess_1_1windows_1_1EventLoop_html_a8a07fc602e31875e6cbcaeac8008f09a"><div class="ttname"><a href="classprocess_1_1windows_1_1EventLoop.html#a8a07fc602e31875e6cbcaeac8008f09a">process::windows::EventLoop::stop</a></div><div class="ttdeci">Try< Nothing > stop()</div></div> +<div class="ttc" id="try_8hpp_html"><div class="ttname"><a href="try_8hpp.html">try.hpp</a></div></div> +<div class="ttc" id="int__fd_8hpp_html"><div class="ttname"><a href="int__fd_8hpp.html">int_fd.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_html_afdecc57ab065ab5d354e728d0ef0ff34"><div class="ttname"><a href="namespaceprocess.html#afdecc57ab065ab5d354e728d0ef0ff34">process::address</a></div><div class="ttdeci">network::inet::Address address()</div><div class="ttdoc">Returns the socket address associated with this instance of the library. </div></div> +<div class="ttc" id="classprocess_1_1windows_1_1EventLoop_html"><div class="ttname"><a href="classprocess_1_1windows_1_1EventLoop.html">process::windows::EventLoop</a></div><div class="ttdef"><b>Definition:</b> libwinio.hpp:28</div></div> +<div class="ttc" id="int__fd_8hpp_html_aea4dbda01c90455f158ffa9b924c2f07"><div class="ttname"><a href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a></div><div class="ttdeci">int int_fd</div><div class="ttdef"><b>Definition:</b> int_fd.hpp:35</div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_a5afdaeaeb57343d0aca728b74dcd3f71"><div class="ttname"><a href="namespaceprocess_1_1windows.html#a5afdaeaeb57343d0aca728b74dcd3f71">process::windows::connect</a></div><div class="ttdeci">Future< Nothing > connect(const int_fd &fd, const network::Address &address)</div></div> +<div class="ttc" id="classprocess_1_1Future_html"><div class="ttname"><a href="classprocess_1_1Future.html">process::Future< size_t ></a></div></div> +<div class="ttc" id="namespaceprocess_1_1windows_html_a04c64346155d34517acdf8b587162868"><div class="ttname"><a href="namespaceprocess_1_1windows.html#a04c64346155d34517acdf8b587162868">process::windows::send</a></div><div class="ttdeci">Future< size_t > send(const int_fd &fd, const void *buf, size_t size)</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.11 +</small></address> +</body> +</html>
