[fpc-pascal] Socket (Depecrated) on FreePascal

Diego Antonio Lucena Pumar diego.lucena.pumar at gmail.com
Sun Mar 1 03:12:42 CET 2009


Hi List:

My name is Diego and write from Spain. I need help. My problem resist on the primitive deprecated Accept. The interface is the following:

function Accept(

  Sock: LongInt;

  var Addr;

  var Addrlen: LongInt

):LongInt;

For my program I need use this interface, and not the modern versions.

Really, I can't compile the program. The error is provacated by the parameter (var Addr;). In the documentation y can read about this type of argument and indicated that is trated of Variable parameters. I read more and opine that this argument need a reference to a structure INADDR. But a call the function this:

Saux := Accept(S1, @Addr, sizeof(Addr));

Where:

S1: is socket descriptor.
Addr; is a variable type TInetSockAddr.

What is my error?. Sorry for my english. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20090301/e6f830b4/attachment.html>


More information about the fpc-pascal mailing list