dayat wrote:
Hi, I'm newbie in sockets programming.

I have code like:

  if not Accept(S, FromName, Sin, Sout) then
    perror('Server accept: '+FromName);

The FromName variable is string. And when the Accept() function
executed I got the error like:
project1.lpr(31,28) Error: Call by var for arg no. 2 has to match
exactly: Got "ShortString" expected "sockaddr_in"


Aahh... took me a while before I realized Accept has 5 different forms (defined in the unit sockets where the accept function is depricated)

Is Sockets the only unit you use or do you use more units ?

Do you use ansistrings ? (see {$H+} in the top of your code). Ifso, declare FromName as ShortString

Marc


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to