<?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[WinSock - Problem]]></title><description><![CDATA[<p>Grüße!</p>
<p>Ich sende mit:</p>
<pre><code class="language-cpp">while(std::cin &gt;&gt; buf)
	{
		cout &lt;&lt; &quot;Sende: &quot; &lt;&lt; buf &lt;&lt; endl;
		rc=send(s,buf,256,0);
	}
</code></pre>
<p>und empfange mit:</p>
<pre><code class="language-cpp">while(rc != SOCKET_ERROR)
	{
		rc=recv(connectedSocket,buf,256,0);
		cout &lt;&lt; buf &lt;&lt; endl;
		if(buf == &quot;bb&quot;)
		{
			cout &lt;&lt; &quot;Bye!&quot; &lt;&lt; endl;
		}
	}
</code></pre>
<p>Wenn ich jetzt &quot;bb&quot; sende, wird auch &quot;bb&quot; ausgegeben, aber &quot;Bye!&quot; nicht, ich verstehe es nicht.</p>
<p>Habe es auch schon mit buf == &quot;bb\0&quot; versucht.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/141076/winsock-problem</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 14:14:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/141076.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Mar 2006 00:52:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 00:52:34 GMT]]></title><description><![CDATA[<p>Grüße!</p>
<p>Ich sende mit:</p>
<pre><code class="language-cpp">while(std::cin &gt;&gt; buf)
	{
		cout &lt;&lt; &quot;Sende: &quot; &lt;&lt; buf &lt;&lt; endl;
		rc=send(s,buf,256,0);
	}
</code></pre>
<p>und empfange mit:</p>
<pre><code class="language-cpp">while(rc != SOCKET_ERROR)
	{
		rc=recv(connectedSocket,buf,256,0);
		cout &lt;&lt; buf &lt;&lt; endl;
		if(buf == &quot;bb&quot;)
		{
			cout &lt;&lt; &quot;Bye!&quot; &lt;&lt; endl;
		}
	}
</code></pre>
<p>Wenn ich jetzt &quot;bb&quot; sende, wird auch &quot;bb&quot; ausgegeben, aber &quot;Bye!&quot; nicht, ich verstehe es nicht.</p>
<p>Habe es auch schon mit buf == &quot;bb\0&quot; versucht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019436</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Sun, 19 Mar 2006 00:52:34 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 01:20:39 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Vergleiche den String mal der Funktion strcmp aus der string.h</p>
<pre><code class="language-cpp">#include &lt;string.h&gt;

/*
.
.
.
*/

while(rc != SOCKET_ERROR)
    {
        rc=recv(connectedSocket,buf,256,0);
        cout &lt;&lt; buf &lt;&lt; endl;
        if(strcmp(buf,&quot;bb&quot;) == 0)
        {
            cout &lt;&lt; &quot;Bye!&quot; &lt;&lt; endl;
        }
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1019443</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019443</guid><dc:creator><![CDATA[Dago]]></dc:creator><pubDate>Sun, 19 Mar 2006 01:20:39 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 02:10:02 GMT]]></title><description><![CDATA[<p>Danke, hat funktioniert.</p>
<p>Warum kann man nicht mit == vergleichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019459</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Sun, 19 Mar 2006 02:10:02 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 02:13:15 GMT]]></title><description><![CDATA[<p>Weil es so nicht funktioniert. Was machst du überhaupt mit Winsock. Lerne erst due Grundlagen der C Programmierung ansonsten gehst du ganz schnell unter, aber ganz schnell.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019460</guid><dc:creator><![CDATA[Itto Ogami]]></dc:creator><pubDate>Sun, 19 Mar 2006 02:13:15 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 06:18:11 GMT]]></title><description><![CDATA[<p>Sogar noch viel schneller als Itto Ogami schauen kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019469</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019469</guid><dc:creator><![CDATA[Steigerung]]></dc:creator><pubDate>Sun, 19 Mar 2006 06:18:11 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 09:38:19 GMT]]></title><description><![CDATA[<p>Außerdem kommt das was du mit send verschickst nicht garantiert mit einem recv wieder an bei TCP/IP.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019501</guid><dc:creator><![CDATA[ü]]></dc:creator><pubDate>Sun, 19 Mar 2006 09:38:19 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:18:23 GMT]]></title><description><![CDATA[<p>Hmm, welches Protokoll verwenden große Teams wie zB. Blizzard?</p>
<p>Denn bei World of Warcraft zB. muss es ja eine &quot;Absicherung&quot; geben, da man ansonsten leicht Items verlieren oder schummeln könnte, wenn keine 99,9% Absicherung besteht.</p>
<p>Wie macht man das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019711</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:18:23 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:20:07 GMT]]></title><description><![CDATA[<p>War deine Frage auf meine Antwort bezogen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019713</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019713</guid><dc:creator><![CDATA[ü]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:20:07 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:22:23 GMT]]></title><description><![CDATA[<p>Eigentlich schon.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019714</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:22:23 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:25:37 GMT]]></title><description><![CDATA[<p>TCP/IP stellt schon sicher daß das, was du abschickst, auch alles bei der anderen Seite ankommt. Du musst lediglich recv() in einer Schleife aufrufen, da die Daten wie schon gesagt, nicht in den &quot;Paketen&quot; ankommen müssen, wie sie abgeschickt werden. Stell es dir mehr wie einen Datenstrom vor.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019715</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019715</guid><dc:creator><![CDATA[bvcxvxc]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:28:53 GMT]]></title><description><![CDATA[<p>das kann man ganz einfach lösen indem man einen header, der immer die gleiche größe hat, nimmt wo dann die größe der eigentlichen daten drinsteht. oder durch trennzeichen wie \r\n.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019717</guid><dc:creator><![CDATA[ü]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:28:53 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:33:55 GMT]]></title><description><![CDATA[<p>Hmm, und wie sieht es mit dem Management aus?</p>
<p>Wie kann ein Client mehr oder weniger gleichzeitig senden/empfangen UND der Server auch?</p>
<p>Also ich weiß dass es select() gibt, aber das ist doch auch ein Blocking-Call..<br />
Und das wäre bei Servern wie bei WoW nicht so gut denke ich.</p>
<p>Wie macht man sowas?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019720</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 15:40:12 GMT]]></title><description><![CDATA[<p>WoW benutzt bestimmt UDP.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019725</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019725</guid><dc:creator><![CDATA[ratefuchs]]></dc:creator><pubDate>Sun, 19 Mar 2006 15:40:12 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 22:14:00 GMT]]></title><description><![CDATA[<p>Und wie sollte man dann sichergehen, dass die Daten auch wirklich angekommen sind?<br />
Dann würden ja bei jedem kleinen Lag 1000e Gegenstände verschwinden -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019990</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019990</guid><dc:creator><![CDATA[ceplusplus]]></dc:creator><pubDate>Sun, 19 Mar 2006 22:14:00 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Sun, 19 Mar 2006 23:20:26 GMT]]></title><description><![CDATA[<p>Sich selbst drum kümmern. Ausserdem haben die Clienten ja nix mit irgendwelchen Gegenständen zu tun, die müssen sie nur darstellen aber handhaben tut sowas doch sowieso alles der Server. Solche Witze daß der Client dem Server sagt was zu tun ist, findet man höchstens noch bei Ultima Online aber das hat nun auch schon beinahe 10 Jahre auf dem Buckel und war das erste richtige MMORPG.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1020006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1020006</guid><dc:creator><![CDATA[alter man]]></dc:creator><pubDate>Sun, 19 Mar 2006 23:20:26 GMT</pubDate></item><item><title><![CDATA[Reply to WinSock - Problem on Tue, 21 Mar 2006 14:33:00 GMT]]></title><description><![CDATA[<p>Die parallelität bekommst du, indem du Verbindungen in Threads auslagerst.</p>
<p>Client Server:<br />
-Client Connectet zu Server<br />
-Server erzeugt neuen Thread für die Verbindung (annehmen mit accept =&gt; Client Socket)<br />
-tritt eine Veränderung auf, von der alle Clients betroffen sind, werden die Daten an alle Clients ausgegeben.</p>
<p>Das ist wirklich nur extrem grob umrissen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
<p>Gruss<br />
Michael S.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021117</guid><dc:creator><![CDATA[focus]]></dc:creator><pubDate>Tue, 21 Mar 2006 14:33:00 GMT</pubDate></item></channel></rss>