<ahref="sock__manager_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/*</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment"> * modification, are permitted provided that the following conditions</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment"> * are met:</span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> * 1. Redistributions of source code must retain the above copyright</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer in the</span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> * documentation and/or other materials provided with the distribution.</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div>
<divclass="ttc"id="asock__manager_8h_html_a0257a018729bc73d0ccc970069a6352c"><divclass="ttname"><ahref="sock__manager_8h.html#a0257a018729bc73d0ccc970069a6352c">receive_string</a></div><divclass="ttdeci">char * receive_string(SOCKET connected_socket)</div><divclass="ttdoc">receive a string line (ending with ' ') from client, return malloc string</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:169</div></div>
<divclass="ttc"id="asock__manager_8h_html_aaeac7207dae4f03273607ba021530da6"><divclass="ttname"><ahref="sock__manager_8h.html#aaeac7207dae4f03273607ba021530da6">receive_stream</a></div><divclass="ttdeci">void * receive_stream(SOCKET connected_socket, OPJ_SIZE_T length)</div><divclass="ttdoc">receive data stream to client</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:120</div></div>
<divclass="ttc"id="asock__manager_8h_html_a7f5fb3b9c22e70ba6e82ca5560d98cc5"><divclass="ttname"><ahref="sock__manager_8h.html#a7f5fb3b9c22e70ba6e82ca5560d98cc5">send_stream</a></div><divclass="ttdeci">void send_stream(SOCKET connected_socket, const void *stream, OPJ_SIZE_T length)</div><divclass="ttdoc">send data stream to client</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:104</div></div>
<divclass="ttc"id="asock__manager_8h_html_a792461126a522ddf1db31e7353c055d8"><divclass="ttname"><ahref="sock__manager_8h.html#a792461126a522ddf1db31e7353c055d8">accept_socket</a></div><divclass="ttdeci">SOCKET accept_socket(SOCKET listening_socket)</div><divclass="ttdoc">accept a new connection to the listenning socket</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:96</div></div>
<divclass="ttc"id="asock__manager_8c_html_a777bd29ec89be2ffb64e799ba58a3c55"><divclass="ttname"><ahref="sock__manager_8c.html#a777bd29ec89be2ffb64e799ba58a3c55">receive_line</a></div><divclass="ttdeci">OPJ_SIZE_T receive_line(SOCKET connected_socket, char *p)</div><divclass="ttdoc">receive a string line (ending with ' ') from client</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:142</div></div>
<divclass="ttc"id="asock__manager_8h_html_aed57d59576e34d348c940f59f9d6a286"><divclass="ttname"><ahref="sock__manager_8h.html#aed57d59576e34d348c940f59f9d6a286">receive_line</a></div><divclass="ttdeci">OPJ_SIZE_T receive_line(SOCKET connected_socket, char *buf)</div><divclass="ttdoc">receive a string line (ending with ' ') from client</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:142</div></div>
<divclass="ttc"id="asock__manager_8c_html_a0257a018729bc73d0ccc970069a6352c"><divclass="ttname"><ahref="sock__manager_8c.html#a0257a018729bc73d0ccc970069a6352c">receive_string</a></div><divclass="ttdeci">char * receive_string(SOCKET connected_socket)</div><divclass="ttdoc">receive a string line (ending with ' ') from client, return malloc string</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:169</div></div>
<divclass="ttc"id="asock__manager_8c_html_a792461126a522ddf1db31e7353c055d8"><divclass="ttname"><ahref="sock__manager_8c.html#a792461126a522ddf1db31e7353c055d8">accept_socket</a></div><divclass="ttdeci">SOCKET accept_socket(SOCKET listening_socket)</div><divclass="ttdoc">accept a new connection to the listenning socket</div><divclass="ttdef"><b>Definition:</b> sock_manager.c:96</div></div>