if (p=nil) or (p^=nil) then exit;\r
fpexecv(p^,p);\r
end;\r
+ function SendTo(Sock: LongInt; const Buf;BufLen: LongInt;Flags: LongInt;var Addr;AddrLen: LongInt):LongInt;
+ begin
+ result := fpsendto(sock,@buf,buflen,flags,@addr,addrlen);
+ end;
+ function RecvFrom(Sock: LongInt;var Buf;Buflen: LongInt;Flags: LongInt;var Addr;var addrlen: Longint):LongInt;
+ begin
+ result := fprecvfrom(sock,@buf,buflen,flags,@addr,@addrlen);
+ end;
+ {$define socket := fpsocket}
+ function Bind(Sock: LongInt;const Addr;AddrLen: LongInt):Boolean;
+ begin
+ result := fpbind(sock,@addr,addrlen) = 0;
+ end;
+ function SetSocketOptions(Sock: LongInt;Level: LongInt;OptName: LongInt;const OptVal;optlen: LongInt):LongInt;
+ begin
+ result := fpsetsockopt(sock,level,optname,@optval,optlen);
+ end;
+ function Connect(Sock: LongInt;const Addr;Addrlen: LongInt):Boolean;
+ begin
+ result := fpconnect(sock,@addr,addrlen) >= 0;
+ end;
+ function listen(Sock: LongInt;MaxConnect: LongInt):Boolean;
+ begin
+ result := fplisten(sock,maxconnect) = 0;
+ end;
+ function GetPeerName(Sock: LongInt; var Addr;var Addrlen: LongInt):LongInt;
+ begin
+ result := fpgetpeername(sock,@addr,@addrlen);
+ end;
+ function GetSocketName(Sock: LongInt; var Addr;var Addrlen: LongInt):LongInt;
+ begin
+ result := fpgetpeername(sock,@addr,@addrlen);
+ end;
+ function Accept(Sock: LongInt; var Addr; var Addrlen: LongInt):LongInt;
+ begin
+ result := fpaccept(sock,@addr,@addrlen);
+ end;
{$endif}\r
{$endif}\r
{$ifdef ver2_0}\r