File: TcpServer_8h_source.html

package info (click to toggle)
stk 4.4.4-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 24,856 kB
  • sloc: cpp: 33,976; tcl: 2,375; sh: 2,319; ansic: 163; perl: 114; makefile: 37
file content (56 lines) | stat: -rw-r--r-- 4,806 bytes parent folder | download | duplicates (2)
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
<HTML>
<HEAD>
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<img src="princeton.gif"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="faq.html">FAQ</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
  <div class="navpath"><a class="el" href="dir_221deb9bdff892d63ed1e409450a60d2.html">include</a>
  </div>
<div class="contents">
<h1>TcpServer.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef STK_TCPSERVER_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define STK_TCPSERVER_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;Socket.h&quot;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="keyword">namespace </span>stk {
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="comment">/***************************************************/</span>
<a name="l00031"></a>00031 <span class="comment">/***************************************************/</span>
<a name="l00032"></a>00032 
<a name="l00033"></a><a class="code" href="classstk_1_1TcpServer.html">00033</a> <span class="keyword">class </span><a class="code" href="classstk_1_1TcpServer.html" title="STK TCP socket server class.">TcpServer</a> : <span class="keyword">public</span> <a class="code" href="classstk_1_1Socket.html" title="STK internet socket abstract base class.">Socket</a>
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035  <span class="keyword">public</span>:
<a name="l00037"></a>00037 
<a name="l00040"></a>00040   <a class="code" href="classstk_1_1TcpServer.html#a0fc92fd76f406ab8eeabbeb27ba9a2fc" title="Default constructor creates a local socket server on port 2006 (or the specified...">TcpServer</a>( <span class="keywordtype">int</span> <a class="code" href="classstk_1_1Socket.html#abe3040ecfff6ce921284c6ab4b0500a7" title="Return the socket port number.">port</a> = 2006 );
<a name="l00041"></a>00041 
<a name="l00043"></a>00043   <a class="code" href="classstk_1_1TcpServer.html#a07ccec68a41a10fbe9f1e9e9db3a85bd" title="The class destructor closes the socket instance, breaking any existing connections...">~TcpServer</a>();
<a name="l00044"></a>00044 
<a name="l00046"></a>00046 
<a name="l00051"></a>00051   <span class="keywordtype">int</span> <a class="code" href="classstk_1_1TcpServer.html#a421e255c3a250c5ac5d9e9642049cb9e" title="Extract the first pending connection request from the queue and create a new connection...">accept</a>( <span class="keywordtype">void</span> );
<a name="l00052"></a>00052 
<a name="l00054"></a>00054   <span class="keywordtype">int</span> <a class="code" href="classstk_1_1TcpServer.html#a4294c5eac74ee54c5367c41e1ee01741" title="Write a buffer over the socket connection. Returns the number of bytes written or...">writeBuffer</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *buffer, <span class="keywordtype">long</span> bufferSize, <span class="keywordtype">int</span> flags = 0);
<a name="l00055"></a>00055 
<a name="l00057"></a>00057   <span class="keywordtype">int</span> <a class="code" href="classstk_1_1TcpServer.html#aafdf74764425a3044093647661ed1927" title="Read a buffer from the socket connection, up to length bufferSize. Returns the number...">readBuffer</a>(<span class="keywordtype">void</span> *buffer, <span class="keywordtype">long</span> bufferSize, <span class="keywordtype">int</span> flags = 0);
<a name="l00058"></a>00058 
<a name="l00059"></a>00059  <span class="keyword">protected</span>:
<a name="l00060"></a>00060 
<a name="l00061"></a>00061 };
<a name="l00062"></a>00062 
<a name="l00063"></a>00063 } <span class="comment">// stk namespace</span>
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
</pre></div></div>
<HR>

<table>
  <tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
  <tr><td>&copy;1995-2012 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>

</BODY>
</HTML>