1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
<!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>
<title>Class Poco::Net::TCPServerDispatcher</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class TCPServerDispatcher</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> TCPServer<br />
<b>Header:</b> Poco/Net/TCPServerDispatcher.h</p>
<h2>Description</h2>
<div class="description">
<p>A helper class for <a href="Poco.Net.TCPServer.html" title="class Poco::Net::TCPServer">TCPServer</a> that dispatches connections to server connection threads. </p>
</div>
<h2>Inheritance</h2>
<p><b>Direct Base Classes: </b><a href="Poco.Runnable.html" title="class Poco::Runnable">Poco::Runnable</a></p>
<p><b>All Base Classes: </b><a href="Poco.Runnable.html" title="class Poco::Runnable">Poco::Runnable</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.TCPServerDispatcher.html#15628" title="Poco::Net::TCPServerDispatcher::beginConnection()">beginConnection</a>, <a href="Poco.Net.TCPServerDispatcher.html#15622" title="Poco::Net::TCPServerDispatcher::currentConnections()">currentConnections</a>, <a href="Poco.Net.TCPServerDispatcher.html#15620" title="Poco::Net::TCPServerDispatcher::currentThreads()">currentThreads</a>, <a href="Poco.Net.TCPServerDispatcher.html#15614" title="Poco::Net::TCPServerDispatcher::duplicate()">duplicate</a>, <a href="Poco.Net.TCPServerDispatcher.html#15629" title="Poco::Net::TCPServerDispatcher::endConnection()">endConnection</a>, <a href="Poco.Net.TCPServerDispatcher.html#15617" title="Poco::Net::TCPServerDispatcher::enqueue()">enqueue</a>, <a href="Poco.Net.TCPServerDispatcher.html#15623" title="Poco::Net::TCPServerDispatcher::maxConcurrentConnections()">maxConcurrentConnections</a>, <a href="Poco.Net.TCPServerDispatcher.html#15626" title="Poco::Net::TCPServerDispatcher::params()">params</a>, <a href="Poco.Net.TCPServerDispatcher.html#15624" title="Poco::Net::TCPServerDispatcher::queuedConnections()">queuedConnections</a>, <a href="Poco.Net.TCPServerDispatcher.html#15625" title="Poco::Net::TCPServerDispatcher::refusedConnections()">refusedConnections</a>, <a href="Poco.Net.TCPServerDispatcher.html#15615" title="Poco::Net::TCPServerDispatcher::release()">release</a>, <a href="Poco.Net.TCPServerDispatcher.html#15616" title="Poco::Net::TCPServerDispatcher::run()">run</a>, <a href="Poco.Net.TCPServerDispatcher.html#15619" title="Poco::Net::TCPServerDispatcher::stop()">stop</a>, <a href="Poco.Net.TCPServerDispatcher.html#15621" title="Poco::Net::TCPServerDispatcher::totalConnections()">totalConnections</a></p>
<p><b>Inherited Functions: </b><a href="Poco.Runnable.html#9810" title="Poco::Runnable::run()">run</a></p>
<h2>Constructors</h2>
<h3><a name="15610">TCPServerDispatcher</a></h3>
<p class="decl"><a href="Poco.Net.TCPServerDispatcher.html" title="class Poco::Net::TCPServerDispatcher">TCPServerDispatcher</a>(<br /> <a href="Poco.Net.TCPServerConnectionFactory.html#15595" title="Poco::Net::TCPServerConnectionFactory::Ptr">TCPServerConnectionFactory::Ptr</a> pFactory,<br /> <a href="Poco.ThreadPool.html" title="class Poco::ThreadPool">Poco::ThreadPool</a> & threadPool,<br /> <a href="Poco.Net.TCPServerParams.html#15648" title="Poco::Net::TCPServerParams::Ptr">TCPServerParams::Ptr</a> pParams<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.TCPServerDispatcher.html" title="class Poco::Net::TCPServerDispatcher">TCPServerDispatcher</a>. </p>
<p>The dispatcher takes ownership of the <a href="Poco.Net.TCPServerParams.html" title="class Poco::Net::TCPServerParams">TCPServerParams</a> object. If no <a href="Poco.Net.TCPServerParams.html" title="class Poco::Net::TCPServerParams">TCPServerParams</a> object is supplied, the <a href="Poco.Net.TCPServerDispatcher.html" title="class Poco::Net::TCPServerDispatcher">TCPServerDispatcher</a> creates one. </p>
</div>
<h2>Destructor</h2>
<h3><a name="15627">~TCPServerDispatcher</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">~<a href="Poco.Net.TCPServerDispatcher.html" title="class Poco::Net::TCPServerDispatcher">TCPServerDispatcher</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.TCPServerDispatcher.html" title="class Poco::Net::TCPServerDispatcher">TCPServerDispatcher</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="15622">currentConnections</a></h3>
<p class="decl">int currentConnections() const;</p>
<div class="description">
<p>Returns the number of currently handled connections. </p>
</div>
<h3><a name="15620">currentThreads</a></h3>
<p class="decl">int currentThreads() const;</p>
<div class="description">
<p>Returns the number of currently used threads. </p>
</div>
<h3><a name="15614">duplicate</a></h3>
<p class="decl">void duplicate();</p>
<div class="description">
<p>Increments the object's reference count. </p>
</div>
<h3><a name="15617">enqueue</a></h3>
<p class="decl">void enqueue(<br /> const <a href="Poco.Net.StreamSocket.html" title="class Poco::Net::StreamSocket">StreamSocket</a> & socket<br />);</p>
<div class="description">
<p>Queues the given socket connection. </p>
</div>
<h3><a name="15623">maxConcurrentConnections</a></h3>
<p class="decl">int maxConcurrentConnections() const;</p>
<div class="description">
<p>Returns the maximum number of concurrently handled connections. </p>
</div>
<h3><a name="15626">params</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const <a href="Poco.Net.TCPServerParams.html" title="class Poco::Net::TCPServerParams">TCPServerParams</a> & params() const;</p>
<div class="description">
<p>Returns a const reference to the TCPServerParam object. </p>
</div>
<h3><a name="15624">queuedConnections</a></h3>
<p class="decl">int queuedConnections() const;</p>
<div class="description">
<p>Returns the number of queued connections. </p>
</div>
<h3><a name="15625">refusedConnections</a></h3>
<p class="decl">int refusedConnections() const;</p>
<div class="description">
<p>Returns the number of refused connections. </p>
</div>
<h3><a name="15615">release</a></h3>
<p class="decl">void release();</p>
<div class="description">
<p>Decrements the object's reference count and deletes the object if the count reaches zero. </p>
</div>
<h3><a name="15616">run</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void run();</p>
<div class="description">
<p>Runs the dispatcher. </p>
</div>
<div class="description"><p><b>See also:</b> <a href="Poco.Runnable.html#9810" title="Poco::Runnable::run()">Poco::Runnable::run()</a></p></div>
<h3><a name="15619">stop</a></h3>
<p class="decl">void stop();</p>
<div class="description">
<p>Stops the dispatcher. </p>
</div>
<h3><a name="15621">totalConnections</a></h3>
<p class="decl">int totalConnections() const;</p>
<div class="description">
<p>Returns the total number of handled connections. </p>
</div>
<h3><a name="15628">beginConnection</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void beginConnection();</p>
<div class="description">
<p>Updates the performance counters. </p>
</div>
<h3><a name="15629">endConnection</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void endConnection();</p>
<div class="description">
<p>Updates the performance counters. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>
</div>
</body>
</html>
|