<?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=380721&amp;view=findpost&amp;p=3347491</guid>
        <pubDate>Sun, 18 Aug 2013 14:45:00 +0000</pubDate>
        <title>Indy 10</title>
        <link>https://forum.sources.ru/index.php?showtopic=380721&amp;view=findpost&amp;p=3347491</link>
        <description><![CDATA[Protector: Установил indy10 и очень об этом жалею. Появились неведомые ошибки объяснить и обработать, которые я не могу.<br>
В основном это ошибка №10038. Еврика сообщает, что она вызывается в юните IdStackWindows:<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">class function TIdSocketListWindows.FDSelect(AReadSet, AWriteSet,</div><div class="code_line">&nbsp;AExceptSet: PFDSet; const ATimeout: Integer): Boolean;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;LResult: Integer;</div><div class="code_line">&nbsp;&nbsp;LTime: TTimeVal;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;if ATimeout = IdTimeoutInfinite then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;LResult := IdWinsock2.Select(0, AReadSet, AWriteSet, AExceptSet, nil);</div><div class="code_line">&nbsp;&nbsp;end else begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;LTime.tv_sec := ATimeout div 1000;</div><div class="code_line">&nbsp;&nbsp; &nbsp;LTime.tv_usec := (ATimeout mod 1000) * 1000;</div><div class="code_line">&nbsp;&nbsp; &nbsp;LResult := IdWinsock2.Select(0, AReadSet, AWriteSet, AExceptSet, @LTime);</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;//TODO: Remove this cast</div><div class="code_line">&nbsp;&nbsp;Result := (GStack as TIdStackBSDBase).CheckForSocketError(LResult) &#62; 0; //&#60;- there is.</div><div class="code_line">end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<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">procedure TIdStackBSDBase.RaiseSocketError(AErr: integer);</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;(*</div><div class="code_line">&nbsp;&nbsp; &nbsp;RRRRR &nbsp; &nbsp;EEEEEE &nbsp; AAAA &nbsp; DDDDD &nbsp; &nbsp; &nbsp; &nbsp; MM &nbsp; &nbsp; MM &nbsp;EEEEEE &nbsp; &nbsp;!! &nbsp;!! &nbsp;!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;RR &nbsp;RR &nbsp; EE &nbsp; &nbsp; &nbsp;AA &nbsp;AA &nbsp;DD &nbsp;DD &nbsp; &nbsp; &nbsp; &nbsp;MMMM MMMM &nbsp;EE &nbsp; &nbsp; &nbsp; &nbsp;!! &nbsp;!! &nbsp;!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;RRRRR &nbsp; &nbsp;EEEE &nbsp; &nbsp;AAAAAA &nbsp;DD &nbsp; DD &nbsp; &nbsp; &nbsp; MM MMM MM &nbsp;EEEE &nbsp; &nbsp; &nbsp;!! &nbsp;!! &nbsp;!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;RR &nbsp;RR &nbsp; EE &nbsp; &nbsp; &nbsp;AA &nbsp;AA &nbsp;DD &nbsp;DD &nbsp; &nbsp; &nbsp; &nbsp;MM &nbsp; &nbsp; MM &nbsp;EE</div><div class="code_line">&nbsp;&nbsp; &nbsp;RR &nbsp; RR &nbsp;EEEEEE &nbsp;AA &nbsp;AA &nbsp;DDDDD &nbsp; &nbsp; &nbsp; &nbsp; MM &nbsp; &nbsp; MM &nbsp;EEEEEE &nbsp; &nbsp;.. &nbsp;.. &nbsp;..</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Please read the note in the next comment.</div><div class="code_line">&nbsp;&nbsp;*)</div><div class="code_line">&nbsp;&nbsp;if AErr = Id_WSAENOTSOCK then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;// You can add this to your exception ignore list for easier debugging.</div><div class="code_line">&nbsp;&nbsp; &nbsp;// However please note that sometimes it is a true error. Your program</div><div class="code_line">&nbsp;&nbsp; &nbsp;// will still run correctly, but the debugger will not stop on it if you</div><div class="code_line">&nbsp;&nbsp; &nbsp;// list it in the ignore list. But for most times its fine to put it in</div><div class="code_line">&nbsp;&nbsp; &nbsp;// the ignore list, it only affects your debugging.</div><div class="code_line">&nbsp;&nbsp; &nbsp;raise EIdNotASocket.CreateError(AErr, WSTranslateSocketErrorMsg(AErr));</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;(*</div><div class="code_line">&nbsp;&nbsp; &nbsp;It is normal to receive a 10038 exception (10038, NOT others!) here when</div><div class="code_line">&nbsp;&nbsp; &nbsp;*shutting down* (NOT at other times!) servers (NOT clients!).</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If you receive a 10038 exception here please see the FAQ at:</div><div class="code_line">&nbsp;&nbsp; &nbsp;http://www.IndyProject.org/</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If you insist upon requesting help via our email boxes on the 10038 error</div><div class="code_line">&nbsp;&nbsp; &nbsp;that is already answered in the FAQ and you are simply too slothful to</div><div class="code_line">&nbsp;&nbsp; &nbsp;search for your answer and ask your question in the public forums you may be</div><div class="code_line">&nbsp;&nbsp; &nbsp;publicly flogged, tarred and feathered and your name may be added to every</div><div class="code_line">&nbsp;&nbsp; &nbsp;chain letter / EMail in existence today.&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Otherwise, if you DID read the FAQ and have further questions, please feel</div><div class="code_line">&nbsp;&nbsp; &nbsp;free to ask using one of the methods (Carefullly note that these methods do</div><div class="code_line">&nbsp;&nbsp; &nbsp;not list email) listed on the Tech Support link at:</div><div class="code_line">&nbsp;&nbsp; &nbsp;http://www.IndyProject.org/</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;RRRRR &nbsp; &nbsp;EEEEEE &nbsp; AAAA &nbsp; DDDDD &nbsp; &nbsp; &nbsp; &nbsp; MM &nbsp; &nbsp; MM &nbsp;EEEEEE &nbsp; &nbsp;!! &nbsp;!! &nbsp;!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;RR &nbsp;RR &nbsp; EE &nbsp; &nbsp; &nbsp;AA &nbsp;AA &nbsp;DD &nbsp;DD &nbsp; &nbsp; &nbsp; &nbsp;MMMM MMMM &nbsp;EE &nbsp; &nbsp; &nbsp; &nbsp;!! &nbsp;!! &nbsp;!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;RRRRR &nbsp; &nbsp;EEEE &nbsp; &nbsp;AAAAAA &nbsp;DD &nbsp; DD &nbsp; &nbsp; &nbsp; MM MMM MM &nbsp;EEEE &nbsp; &nbsp; &nbsp;!! &nbsp;!! &nbsp;!!</div><div class="code_line">&nbsp;&nbsp; &nbsp;RR &nbsp;RR &nbsp; EE &nbsp; &nbsp; &nbsp;AA &nbsp;AA &nbsp;DD &nbsp;DD &nbsp; &nbsp; &nbsp; &nbsp;MM &nbsp; &nbsp; MM &nbsp;EE</div><div class="code_line">&nbsp;&nbsp; &nbsp;RR &nbsp; RR &nbsp;EEEEEE &nbsp;AA &nbsp;AA &nbsp;DDDDD &nbsp; &nbsp; &nbsp; &nbsp; MM &nbsp; &nbsp; MM &nbsp;EEEEEE &nbsp; &nbsp;.. &nbsp;.. &nbsp;..</div><div class="code_line">&nbsp;&nbsp;*)</div><div class="code_line">&nbsp;&nbsp;raise EIdSocketError.CreateError(AErr, WSTranslateSocketErrorMsg(AErr));</div><div class="code_line">end;</div></ol></div></div></div></div><br>
Исключения появляются, когда браузер-клиент получает ответ на запрос, посланный через idMappedPortTCP.<br>
Что мне делать для избежания подобных исключений?<br>
Единственный выход, который я вижу это вновь установить Indy9.]]></description>
        <author>Protector</author>
        <category>Delphi: Сетевое программирование</category>
      </item>
	
      </channel>
      </rss>
	