<?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[Asynchron Error bei TServerSocket &amp;amp; TClientSocket]]></title><description><![CDATA[<p>Ich bekomme bei folgendem Code ständig einen Asynchron. Error:</p>
<p>Server:</p>
<pre><code>void __fastcall Tf1::FormCreate(TObject *Sender)
{
AnsiString zeit = &quot; [&quot; + Now().TimeString() + &quot; ] &quot;;
try {
s1-&gt;Port = 88;
sm1-&gt;Lines-&gt;Add(zeit + &quot;Serverport festgelegt...&quot;);
}
catch(...) {
sm1-&gt;Lines-&gt;Add(zeit + &quot;Konnte Port nicht festlegen...&quot;);
}
try {
s1-&gt;Active = true;
s1-&gt;Open();
sm1-&gt;Lines-&gt;Add(zeit + &quot;Server gestartet...&quot;);
}
catch(...) {
sm1-&gt;Lines-&gt;Add(zeit + &quot;Konnte Server nicht starten...&quot;);
try {
s1-&gt;Close();
s1-&gt;Active = true;
s1-&gt;Open();
sm1-&gt;Lines-&gt;Add(zeit + &quot;Server wurde neu gestartet...&quot;);
}
catch(...) {
sm1-&gt;Lines-&gt;Add(zeit + &quot;Server konnte nicht neu gestartet werden...&quot;);
}
}
}
</code></pre>
<p>Client</p>
<pre><code>l2-&gt;Caption = &quot;Vorbereiten der Verbindung...&quot;;
cs-&gt;Close(); //falls ein solcher server noch läuft...
cs-&gt;Active = false;
l2-&gt;Caption = &quot;Laden...&quot;;
try {
cs-&gt;Port = 88;
}
catch(...) {
l2-&gt;Caption = &quot;Error...&quot;;
}
try {
cs-&gt;Host = &quot;127.0.0.1&quot;;
//cs-&gt;Address = &quot;localhost&quot;;
}
catch (...) {
l2-&gt;Caption = &quot;Error...&quot;;
}
try {
cs-&gt;Active = true;
cs-&gt;Open();
}
catch (...)
{
l2-&gt;Caption = &quot;Error:...&quot;;
}
</code></pre>
<p>Was stimmt da nicht?</p>
<p>Viele Grüße</p>
<p>shaftie</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/87672/asynchron-error-bei-tserversocket-amp-tclientsocket</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Jul 2026 19:22:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/87672.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 Oct 2004 15:02:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 15:02:00 GMT]]></title><description><![CDATA[<p>Ich bekomme bei folgendem Code ständig einen Asynchron. Error:</p>
<p>Server:</p>
<pre><code>void __fastcall Tf1::FormCreate(TObject *Sender)
{
AnsiString zeit = &quot; [&quot; + Now().TimeString() + &quot; ] &quot;;
try {
s1-&gt;Port = 88;
sm1-&gt;Lines-&gt;Add(zeit + &quot;Serverport festgelegt...&quot;);
}
catch(...) {
sm1-&gt;Lines-&gt;Add(zeit + &quot;Konnte Port nicht festlegen...&quot;);
}
try {
s1-&gt;Active = true;
s1-&gt;Open();
sm1-&gt;Lines-&gt;Add(zeit + &quot;Server gestartet...&quot;);
}
catch(...) {
sm1-&gt;Lines-&gt;Add(zeit + &quot;Konnte Server nicht starten...&quot;);
try {
s1-&gt;Close();
s1-&gt;Active = true;
s1-&gt;Open();
sm1-&gt;Lines-&gt;Add(zeit + &quot;Server wurde neu gestartet...&quot;);
}
catch(...) {
sm1-&gt;Lines-&gt;Add(zeit + &quot;Server konnte nicht neu gestartet werden...&quot;);
}
}
}
</code></pre>
<p>Client</p>
<pre><code>l2-&gt;Caption = &quot;Vorbereiten der Verbindung...&quot;;
cs-&gt;Close(); //falls ein solcher server noch läuft...
cs-&gt;Active = false;
l2-&gt;Caption = &quot;Laden...&quot;;
try {
cs-&gt;Port = 88;
}
catch(...) {
l2-&gt;Caption = &quot;Error...&quot;;
}
try {
cs-&gt;Host = &quot;127.0.0.1&quot;;
//cs-&gt;Address = &quot;localhost&quot;;
}
catch (...) {
l2-&gt;Caption = &quot;Error...&quot;;
}
try {
cs-&gt;Active = true;
cs-&gt;Open();
}
catch (...)
{
l2-&gt;Caption = &quot;Error:...&quot;;
}
</code></pre>
<p>Was stimmt da nicht?</p>
<p>Viele Grüße</p>
<p>shaftie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619447</guid><dc:creator><![CDATA[shaftie]]></dc:creator><pubDate>Sat, 02 Oct 2004 15:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 17:04:15 GMT]]></title><description><![CDATA[<p>Auf welcher Seite tritt der Fehler auf, und in welcher Zeile?</p>
<p>Und hast du schon mal was von Einrückungen gehört? Wer soll sich so eine Codewüste denn durchlesen!?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619508</guid><dc:creator><![CDATA[Code-Formatierer]]></dc:creator><pubDate>Sat, 02 Oct 2004 17:04:15 GMT</pubDate></item><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 17:49:42 GMT]]></title><description><![CDATA[<p>Der Fehler tritt auf, wenn das Programm gestartet wird. Einen Compiler- Fehler gibt es nicht.</p>
<p>Entschuldige bitte, ich werde beim nächsten Mal darauf achten, den Code besser zu formatieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619545</guid><dc:creator><![CDATA[shaftie_guest.]]></dc:creator><pubDate>Sat, 02 Oct 2004 17:49:42 GMT</pubDate></item><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 17:57:16 GMT]]></title><description><![CDATA[<p>shaftie_guest. schrieb:</p>
<blockquote>
<p>Der Fehler tritt auf, wenn das Programm gestartet wird.</p>
</blockquote>
<p>Es sind doch eindeutig zweit Teile, Server und Client! Welcher stürzt denn nun ab?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619549</guid><dc:creator><![CDATA[nirsaja]]></dc:creator><pubDate>Sat, 02 Oct 2004 17:57:16 GMT</pubDate></item><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 17:59:15 GMT]]></title><description><![CDATA[<p>Der Client</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619552</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619552</guid><dc:creator><![CDATA[shaftie]]></dc:creator><pubDate>Sat, 02 Oct 2004 17:59:15 GMT</pubDate></item><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 18:14:32 GMT]]></title><description><![CDATA[<p>Lass das</p>
<pre><code>cs-&gt;Active = true;
</code></pre>
<p>weg!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619562</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619562</guid><dc:creator><![CDATA[nirsaja]]></dc:creator><pubDate>Sat, 02 Oct 2004 18:14:32 GMT</pubDate></item><item><title><![CDATA[Reply to Asynchron Error bei TServerSocket &amp;amp; TClientSocket on Sat, 02 Oct 2004 20:25:41 GMT]]></title><description><![CDATA[<p>Danke... Aber es ändert nichts, außer dass die Meldung nun ca. 2sek nach dem Programmstart kommt statt direkt am Anfang...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/619620</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/619620</guid><dc:creator><![CDATA[shaftie]]></dc:creator><pubDate>Sat, 02 Oct 2004 20:25:41 GMT</pubDate></item></channel></rss>