<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="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 class="im"><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 class="im">
In our previous episode, Jonas Maebe said:<br>
</div><div class="im"><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 class="im">
<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 class="HOEnZb"><font color="#888888"><br>
<br>
<br>
Jonas</font></span><div class="HOEnZb"><div class="h5"><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>