Line 0
Link Here
|
|
|
1 |
--- synapse/source/lib/ssfpc.pas 2010-04-23 18:23:27.000000000 +0100 |
2 |
+++ synapse/source/lib/ssfpc.pas 2010-04-23 18:33:20.000000000 +0100 |
3 |
@@ -514,7 +514,7 @@ |
4 |
|
5 |
function Bind(s: TSocket; const addr: TVarSin): Integer; |
6 |
begin |
7 |
- if sockets.Bind(s, addr, SizeOfVarSin(addr)) then |
8 |
+ if sockets.fpbind(s, @addr, SizeOfVarSin(addr))=0 then |
9 |
Result := 0 |
10 |
else |
11 |
Result := SOCKET_ERROR; |
12 |
@@ -522,7 +522,7 @@ |
13 |
|
14 |
function Connect(s: TSocket; const name: TVarSin): Integer; |
15 |
begin |
16 |
- if sockets.Connect(s, name, SizeOfVarSin(name)) then |
17 |
+ if sockets.fpconnect(s, @name, SizeOfVarSin(name))=0 then |
18 |
Result := 0 |
19 |
else |
20 |
Result := SOCKET_ERROR; |
21 |
@@ -534,7 +534,7 @@ |
22 |
begin |
23 |
len := SizeOf(name); |
24 |
FillChar(name, len, 0); |
25 |
- Result := sockets.GetSocketName(s, name, Len); |
26 |
+ Result := sockets.fpgetsockname(s, @name, @Len); |
27 |
end; |
28 |
|
29 |
function GetPeerName(s: TSocket; var name: TVarSin): Integer; |
30 |
@@ -543,7 +543,7 @@ |
31 |
begin |
32 |
len := SizeOf(name); |
33 |
FillChar(name, len, 0); |
34 |
- Result := sockets.GetPeerName(s, name, Len); |
35 |
+ Result := sockets.fpgetpeername(s, @name, @Len); |
36 |
end; |
37 |
|
38 |
function GetHostName: string; |
39 |
@@ -553,17 +553,17 @@ |
40 |
|
41 |
function Send(s: TSocket; Buf: TMemory; len, flags: Integer): Integer; |
42 |
begin |
43 |
- Result := sockets.Send(s, Buf^, len, flags); |
44 |
+ Result := sockets.fpsend(s, Buf, len, flags); |
45 |
end; |
46 |
|
47 |
function Recv(s: TSocket; Buf: TMemory; len, flags: Integer): Integer; |
48 |
begin |
49 |
- Result := sockets.Recv(s, Buf^, len, flags); |
50 |
+ Result := sockets.fprecv(s, Buf, len, flags); |
51 |
end; |
52 |
|
53 |
function SendTo(s: TSocket; Buf: TMemory; len, flags: Integer; addrto: TVarSin): Integer; |
54 |
begin |
55 |
- Result := sockets.SendTo(s, Buf^, len, flags, addrto, SizeOfVarSin(addrto)); |
56 |
+ Result := sockets.fpsendto(s, Buf, len, flags, @addrto, SizeOfVarSin(addrto)); |
57 |
end; |
58 |
|
59 |
function RecvFrom(s: TSocket; Buf: TMemory; len, flags: Integer; var from: TVarSin): Integer; |
60 |
@@ -571,7 +571,7 @@ |
61 |
x: integer; |
62 |
begin |
63 |
x := SizeOf(from); |
64 |
- Result := sockets.RecvFrom(s, Buf^, len, flags, from, x); |
65 |
+ Result := sockets.fprecvfrom(s, Buf, len, flags, @from, @x); |
66 |
end; |
67 |
|
68 |
function Accept(s: TSocket; var addr: TVarSin): TSocket; |
69 |
@@ -579,24 +579,24 @@ |
70 |
x: integer; |
71 |
begin |
72 |
x := SizeOf(addr); |
73 |
- Result := sockets.Accept(s, addr, x); |
74 |
+ Result := sockets.fpaccept(s, @addr, @x); |
75 |
end; |
76 |
|
77 |
function Shutdown(s: TSocket; how: Integer): Integer; |
78 |
begin |
79 |
- Result := sockets.Shutdown(s, how); |
80 |
+ Result := sockets.fpshutdown(s, how); |
81 |
end; |
82 |
|
83 |
function SetSockOpt(s: TSocket; level, optname: Integer; optval: Tmemory; |
84 |
optlen: Integer): Integer; |
85 |
begin |
86 |
- Result := sockets.SetSocketOptions(s, level, optname, optval^, optlen); |
87 |
+ Result := sockets.fpsetsockopt(s, level, optname, optval, optlen); |
88 |
end; |
89 |
|
90 |
function GetSockOpt(s: TSocket; level, optname: Integer; optval: Tmemory; |
91 |
var optlen: Integer): Integer; |
92 |
begin |
93 |
- Result := sockets.GetSocketOptions(s, level, optname, optval^, optlen); |
94 |
+ Result := sockets.fpgetsockopt(s, level, optname, optval, @optlen); |
95 |
end; |
96 |
|
97 |
function ntohs(netshort: word): word; |
98 |
@@ -611,7 +611,7 @@ |
99 |
|
100 |
function Listen(s: TSocket; backlog: Integer): Integer; |
101 |
begin |
102 |
- if sockets.Listen(s, backlog) then |
103 |
+ if sockets.fplisten(s, backlog)=0 then |
104 |
Result := 0 |
105 |
else |
106 |
Result := SOCKET_ERROR; |
107 |
@@ -634,12 +634,12 @@ |
108 |
|
109 |
function CloseSocket(s: TSocket): Integer; |
110 |
begin |
111 |
- Result := sockets.CloseSocket(s); |
112 |
+ Result := 0; { NOP? } |
113 |
end; |
114 |
|
115 |
function Socket(af, Struc, Protocol: Integer): TSocket; |
116 |
begin |
117 |
- Result := sockets.Socket(af, struc, protocol); |
118 |
+ Result := sockets.fpsocket(af, struc, protocol); |
119 |
end; |
120 |
|
121 |
function Select(nfds: Integer; readfds, writefds, exceptfds: PFDSet; |