Lukas Gebauer wrote:
> BTW: What about CloseSocket function? Why not exists similar 
> fpCloseSocket?
>
>   
The principle of the reform was to align FPC with the standard (BSD) 
socket api's.

However close is a bit of a problem, because under Unix you directly use 
close (2) or (3), which is not a specific socket function, while under 
Windows you need a specific socket function (wsaclose) to close.

Since it is not a standarized unix function, no FPC prefix, though on 
unix you could use fpclose for which closesocket is an alias.

It is just there to avoid endless

{$ifdef unix}
  fpclose(socket);
{$else}
 {$ifdef windows}
  wsaclose(socket}
{$else}
  {$error don't know how to close]
{$endif}
{$endif}

sequences so that you can crossplatformwise close a socket.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to