<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Frage zu Server mit mehreren Clients]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie erstellt man einen Server, der mehrere clients bedienen kann?</p>
<p>Ich meine damit, mein Server lauscht auf einen Port und wenn eine Verbindung kommt, nimmt er diese an.</p>
<p>Kann ich dann für den nächsten client auf dem selben port lauschen?</p>
<p>Wenn nein, wie schaffe ich es, dass sich jeder client nen anderen port wählt, wenn er nicht wissen kann, der wievielte client er sein wird?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160531/frage-zu-server-mit-mehreren-clients</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 20:29:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160531.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Sep 2006 17:02:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zu Server mit mehreren Clients on Tue, 26 Sep 2006 17:02:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie erstellt man einen Server, der mehrere clients bedienen kann?</p>
<p>Ich meine damit, mein Server lauscht auf einen Port und wenn eine Verbindung kommt, nimmt er diese an.</p>
<p>Kann ich dann für den nächsten client auf dem selben port lauschen?</p>
<p>Wenn nein, wie schaffe ich es, dass sich jeder client nen anderen port wählt, wenn er nicht wissen kann, der wievielte client er sein wird?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1144945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144945</guid><dc:creator><![CDATA[MisterX]]></dc:creator><pubDate>Tue, 26 Sep 2006 17:02:19 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Server mit mehreren Clients on Tue, 26 Sep 2006 17:29:43 GMT]]></title><description><![CDATA[<p>warum liest du dir nicht ein tutorial durch bevor du hier fragst?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1144967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144967</guid><dc:creator><![CDATA[offfffffff]]></dc:creator><pubDate>Tue, 26 Sep 2006 17:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Server mit mehreren Clients on Tue, 26 Sep 2006 17:37:31 GMT]]></title><description><![CDATA[<blockquote>
<p>Kann ich dann für den nächsten client auf dem selben port lauschen?</p>
</blockquote>
<p>ja kannst du!</p>
<p>wenn du dann irgendwann mal Threads brauchst, dann kann ich dir boost empfehlen:</p>
<pre><code class="language-cpp">#include &lt;boost/thread/thread.hpp&gt;
#include &lt;iostream&gt;
#include &lt;windows.h&gt;
using namespace std;

void hello_world() {

        for(int i = 0; i &lt; 10; i++)
        {
                cout&lt;&lt;&quot;Hello world, I'm a thread!&quot;&lt;&lt; endl;
                Sleep(100);
        }
}

void brown_fox() {

        for(int i = 0; i &lt; 10; i++)
        {
                cout &lt;&lt;&quot;The quick brown fox jumps over the lazy dog&quot;&lt;&lt; endl;
                Sleep(50);
        }
}

int main(int argc, char* argv[]) {
        // start a new thread that calls the &quot;hello_world&quot; function
        boost::thread my_thread(&amp;hello_world);

        // start a new thread that calls the &quot;brown_fox&quot; function
        boost::thread my_thread2(&amp;brown_fox);

        // wait for the threads to finish
        my_thread.join();
        my_thread2.join();

        system(&quot;pause&quot;);

        return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1144973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144973</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Tue, 26 Sep 2006 17:37:31 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Server mit mehreren Clients on Tue, 26 Sep 2006 20:39:38 GMT]]></title><description><![CDATA[<p>Ne das mit den Threads läuft schon ohne boost!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145125</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145125</guid><dc:creator><![CDATA[MisterX]]></dc:creator><pubDate>Tue, 26 Sep 2006 20:39:38 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Server mit mehreren Clients on Wed, 27 Sep 2006 13:52:22 GMT]]></title><description><![CDATA[<p><a href="http://www.c-worker.ch" rel="nofollow">tutorial</a> Da gibts auch en tutorial wie man mehrer Clients bedient</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145432</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145432</guid><dc:creator><![CDATA[tobZel]]></dc:creator><pubDate>Wed, 27 Sep 2006 13:52:22 GMT</pubDate></item></channel></rss>