<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">You can get some hints from minilib<br><a href="https://sourceforge.net/p/minilib">https://sourceforge.net/p/minilib</a><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
"socket" directory<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 2:53 PM, Xiangrong Fang <span dir="ltr"><<a href="mailto:xrfang@gmail.com" target="_blank">xrfang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">using the socket like read/write file is very convenient.  This is the first time I use fpc to write socket program, it is much easier than I used Indy or ICS in Delphi several years ago.<br>
<br>I hope to "modernize" or make it more stable, instead of deprecate it.  Of course deprecate Connect and use fpConnect + Sock2Text manually is not a big deal.<br>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/16 Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><br>
On 16 Apr 2013, at 12:13, Marco van de Voort wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
In our previous episode, Jonas Maebe said:<br>
</div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As far as I can see, all errors are returned via inoutres/IOResult in<br>
the same way as happens with disk-based IO.<br>
</blockquote>
<br>
Yes. An attempt is made to map some of the errors to I/O. Anyway, if sb<br>
wants to support and modernize them, I have no problem with that. But that<br>
hasn't happened since 2005-2007 or so.<br>
</div></blockquote>
<br>
What needs to be modernised about it? It's not like our disk i/o error code handles many more different error codes, nor are those errors much more specific. I remember the old discussion, but I never understood how the error reporting of the sockets code and the generic I/O code differed in a way that made the former worse than the latter.<div>


<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That would also make it possible to directly map socketerror to<br>
getlastresult/fpgeterrno, instead of caching it in another threadvar.<br>
</blockquote>
<br></div>
IIRC the problem with removing socketerror would be that it could easily break existing code (given that socketerror is not overwritten by calls other than those from the sockets unit).<span><font color="#888888"><br>


<br>
<br>
Jonas</font></span><div><div><br>
______________________________<u></u>_________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.<u></u>org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/<u></u>mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><span style="font-family:courier new,monospace">I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3<br>
<br>Best Regards<br>Zaher Dirkey</span></div>
</div>