<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=911759</guid>
        <pubDate>Thu, 10 Nov 2005 10:56:42 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=911759</link>
        <description><![CDATA[Krai: 10.11.2005 Разобрался окончательно&#33;&#33;&#33;<br>Никаких три служебных сообщения он не посылает. Все проблемы были из-за того, что на сервере и клиенте у меня сообщения имели разную длину. На клиенте длиньше, чем на сервере.<br>Понял из-за того, что столкнулся с другой проблемой, когда подряд отправляется много сообщений клиенту, вот там и стало видно, что происходит смещение.Как привел длину сообщений к одному значению, нужда в получении &quot;трех дополнительных&quot; сама собой отпала. Вот так вот.]]></description>
        <author>Krai</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=899232</guid>
        <pubDate>Fri, 28 Oct 2005 10:34:06 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=899232</link>
        <description><![CDATA[Krai: Поборол таки.<br>
Вообщем дело было так:<br>
После того, как сервер отправляет команду на отключение, он еще (за спиной) посылает три пакета, а так как я по получении команды отключиться, в клиенте сразу отключался, естесвенно сервер не мог эти три пакета доставить. Вот и байда.<br>
<br>
Спасибо <strong class='tag-b'>Oleg2004</strong>, навел на нужные мысли.]]></description>
        <author>Krai</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898857</guid>
        <pubDate>Fri, 28 Oct 2005 06:13:25 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898857</link>
        <description><![CDATA[Oleg2004: <strong class='tag-b'>Krai</strong><br>
Вариантов может быть куча.<br>
Я не особенный спец в Дельфи, но вот <a class='tag-url' href='http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_thread/thread/385a843fb213d0ce/f2e7342bb36d71f9?lnk=st&q=WSAECONNABORTED&rnum=10#f2e7342bb36d71f9' target='_blank'>тут</a><br>
описана ситуация близкая к вашей.<br>
Комбинаций может быть несколько, при который происходит выдача 53-ей ошибки<br>
53 ошибка связана с неприходом ACK от клиента или приемом FIN от клиента или с комбинациями с ними связанными.<br>
Причем тут комбинации? А при том, что модуль TCP- это конечный логический автомат с четко заданными состояниями, и все зависит от того, в каком состоянии был автомат, когда возникла та или иная ситуация - в результате событие вроде одно, а реакций может быть несколько - ну это так, &quot;на пальцах&quot;<br>
А 54-ая - это уже посылка RST - значит клиент вдогонку еще послал и его<br>
Механизм описан ниже:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>WSAECONNABORTED (10053) Software caused connection abort. <br>
Berkeley description: A connection abort was caused internal to your host machine. The software caused a connection abort because there is no space on the socket&#39;s queue and the socket cannot receive further connections. <br>
WinSock description: Partly the same as Berkeley. The error can occur when the local network system aborts a connection. This would occur if WinSock aborts an established connection after data retransmission fails (receiver never acknowledges data sent on a datastream socket). <br>
TCP/IP scenario: A connection will timeout if the local system doesn&#39;t receive an (ACK)nowledgement for data sent. It would also timeout if a (FIN)ish TCP packet is not ACK&#39;d (and even if the FIN is ACK&#39;d, it will eventually timeout if a FIN is not returned). <br>
User suggestions: There are a number of things to check, that might help to identify why the failure occurred. Basically, you want to identify where the problem occurred. <br>
·	Ping the remote host you were connected to. If it doesn&#39;t respond, it might be off-line or there may be a network problem along the way. If it does respond, then this problem might have been a transient one (so you can reconnect now), or the server application you were connected to might have terminated (so you might not be able to connect again). <br>
·	Ping a local host to verify that your local network is still functioning (if on a serial connection, see next step) <br>
·	Ping your local router address. If you&#39;re on a serial connection, your local router is the IP address of the host you initially logged onto with SLIP or PPP. <br>
·	Ping a host on the same subnet as the host you were connected to (if you know one). This will verify that the destination network is functioning. <br>
·	Try a &quot;traceroute&quot; to the host you were connected to. This won&#39;t reveal too much unless you know the router addresses at the remote end, but it might help to identify if the problem is somewhere along the way. <br>
<br>
WSAECONNRESET (10054) Connection reset by peer. <br>
Berkeley description: A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or a reboot. <br>
WinSock description: Same as Berkeley. On a datastream socket, the connection was reset. This reset could be generated locally by the network system when it detects a connection failure, or it might be received from the remote host (in TCP terms, the remote host sent a RST packet). This error is also possible on a datagram socket; for instance, this error could result if your application sends a UDP datagram to a host, which rejects it by responding with an ICMP Port Unreachable. <br>
User suggestions: Some network systems have commands to report statistics. In this case, it might be possible to check the count of TCP RST packets received, or ICMP Port Unreachable packets. See other suggestions under WSAECONNABORTED. <br>
</div></div>]]></description>
        <author>Oleg2004</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898789</guid>
        <pubDate>Fri, 28 Oct 2005 04:18:00 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898789</link>
        <description><![CDATA[Krai: Тоесть предлагаете написать код со следующией логикой:<br>На сервере:<br>1. Если происходит событие onDisconect, то убираем из списка клиентов, того клиента кто вызвал это событие<br>2. Если происходит ошибка 10053, то тоже убирать из списка.<br><br>А ведь всед за 10053, через некоторый промежуток времени происходит ошибка 10054 (Удаленый хост принудительно разоравал соединение).<br><br>Да дело то не в том, что б отловить ошибку и погасить её (ErrorCode=0), а в том, что я хочу понять почему один и тот же код вызываемый в разных местах программы, в разные промежутки времени, в одном случаие на сервере проходит корректно, а в другом случаие вызывает ексепшн.<br><br>Может дело из-за того, что у меня во второй раз метод Close() вызывается из класса который вертится в отдельном потоке?<br>Но я пробовавал следующее: я создал метод класса Disc(), который вызвает метод Close() сокета, и вызывал Disc() с того места где все проходит нормально, и ошибок не возникало &#33;<br><br>В чем проблема то?]]></description>
        <author>Krai</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898083</guid>
        <pubDate>Thu, 27 Oct 2005 11:15:28 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898083</link>
        <description><![CDATA[exodus: Обрабатывай ивент сокета OnError(eeDisconnet).]]></description>
        <author>exodus</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898030</guid>
        <pubDate>Thu, 27 Oct 2005 10:32:35 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=898030</link>
        <description><![CDATA[Oleg2004: <strong class='tag-b'>Krai</strong><br>
WSAECONNABORTED		ECONNABORTED	10053<br>
Так и есть, соединение прервано]]></description>
        <author>Oleg2004</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=897975</guid>
        <pubDate>Thu, 27 Oct 2005 09:55:56 +0000</pubDate>
        <title>Ошибка сокета 10053</title>
        <link>https://forum.sources.ru/index.php?showtopic=119630&amp;view=findpost&amp;p=897975</link>
        <description><![CDATA[Krai: Пишу приложение на TServerSocket и TClientSocket<br>
<br>
Когда выполняю следующий код в программе клиенте, то ошибок нигде не возникает:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;if( TcpAgentClient-&#62;Connect())</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; TcpAgentClient-&#62;Disconnect();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;ShowMessage(&quot;Ok&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; ShowMessage(&quot;Connected FAILURE!!!&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;};</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
Тоесть и клиент и сервер правильно реагируют. <br>
Ошибка возникает когда программа сервер подает запрос на то, чтоб клиент отключился. ТОесть она передает сообщение, типа &quot;Заверши работу&quot;, клиент его обрабатывает и завершает работу, и вот в этот момент сервер выдает ошибку сокета Asynchronous socket error 10053<br>
Вот код обработки сообщения:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if (Command==&quot;SERVER_Stop_job&quot;)</div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (m_tcpClient-&#62;Active)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;m_tcpClient-&#62;Close();</div><div class="code_line">&nbsp;&nbsp; &nbsp;};</div><div class="code_line">&nbsp;&nbsp; };</div></ol></div></div></div></div><br>
При этом на сервере событие OnDisconnect не происходит и сервер подключение не закрывает. А клиент не выдает никаких ошибок и закрывает соединение.<br>
<br>
Помогите, может советом, может кодом.<br>
<br>
з.ы. <br>
m_tcpClient и TcpAgentClient это ссылки на один и тот же компонент. TcpAgentClient лежит на форме, m_tcpClient член класса.]]></description>
        <author>Krai</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      </channel>
      </rss>
	