begin\r
result := getpeername(sock,addr,addrlen);\r
end;\r
+ function system_getsocketname(Sock: LongInt;var Addr;var Addrlen: LongInt):LongInt;\r
+ begin\r
+ result := getsocketname(sock,addr,addrlen);\r
+ end;\r
function system_listen(Sock: LongInt; MaxConnect: LongInt):Boolean;\r
begin\r
result := listen(sock,maxconnect);\r
{$ifdef win32}\r
winsock.getsockname(self.fdhandlein,psockaddr(@addr)^,i);\r
{$else}\r
- getsocketname(self.fdhandlein,addr,i);\r
+ system_getsocketname(self.fdhandlein,addr,i);\r
{$endif}\r
binip := inaddrvtobinip(addr);\r
converttov4(binip);\r
winsock.getsockname(self.fdhandlein,psockaddrin(@addr)^,i);\r
\r
{$else}\r
- getsocketname(self.fdhandlein,addr,i);\r
+ system_getsocketname(self.fdhandlein,addr,i);\r
\r
{$endif}\r
result := inttostr(htons(addr.InAddr.port));\r
end;\r
function GetSocketName(Sock: LongInt; var Addr;var Addrlen: LongInt):LongInt;\r
begin\r
- result := fpgetpeername(sock,@addr,@addrlen);\r
+ result := fpgetsockname(sock,@addr,@addrlen);\r
end;\r
function Accept(Sock: LongInt; var Addr; var Addrlen: LongInt):LongInt;\r
begin\r