[fpc-pascal] why connect is "deprecated"

Xiangrong Fang xrfang at gmail.com
Tue Apr 16 11:52:56 CEST 2013


Yes, I read the source code and found that fpconnect + socktotext =
connect, but just don't know why combining them together is a bad idea :-)
thanks


2013/4/16 Victor Campillo <victor.campillo at gmail.com>

>  On 16/04/13 11:12, Xiangrong Fang wrote:
>
>  Hi All,
>
> I am trying to write a tcp client (redis) in free pascal, and found this
> function marked as deprecated:
>
> Function Connect(Sock:longint;const addr:TInetSockAddr;var
> SockIn,SockOut:text):Boolean; deprecated;
>
>  My question is, why it is deprecated, or, what is the replacement for
> this function?
>
>  Thanks
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.orghttp://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>  Hi,
>
> I think that Connect was replaced by fpconnect that is more cross
> platform, so you should use fpconnect instead of Connect.
> The same happens with the other sockets functions like Accept, Bind, etc.
> You should use fpaccept, fpbind, etc.
>
> See unit rtl/inc/socketsh.inc
>
> Best Regards.
>
> --
> Victor Campillo
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130416/c5e8626c/attachment.html>


More information about the fpc-pascal mailing list