[fpc-pascal] why connect is "deprecated"

Zaher Dirkey parmaja at gmail.com
Tue Apr 16 22:05:43 CEST 2013


You can get some hints from minilib
https://sourceforge.net/p/minilib
"socket" directory


On Tue, Apr 16, 2013 at 2:53 PM, Xiangrong Fang <xrfang at gmail.com> wrote:

> 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.
>
> 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.
>
>
> 2013/4/16 Jonas Maebe <jonas.maebe at elis.ugent.be>
>
>>
>> On 16 Apr 2013, at 12:13, Marco van de Voort wrote:
>>
>>  In our previous episode, Jonas Maebe said:
>>>
>>>> As far as I can see, all errors are returned via inoutres/IOResult in
>>>> the same way as happens with disk-based IO.
>>>>
>>>
>>> Yes. An attempt is made to map some of the errors to I/O. Anyway, if sb
>>> wants to support and modernize them, I have no problem with that. But
>>> that
>>> hasn't happened since 2005-2007 or so.
>>>
>>
>> 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.
>>
>>
>>  That would also make it possible to directly map socketerror to
>>> getlastresult/fpgeterrno, instead of caching it in another threadvar.
>>>
>>
>> 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).
>>
>>
>> Jonas
>>
>> ______________________________**_________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
>> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



-- 
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130416/d27e60d4/attachment.html>


More information about the fpc-pascal mailing list