mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 10:29:08 +02:00
* some 1.9.x fixes
This commit is contained in:
parent
b0d7f0a9f3
commit
5fac440240
@ -6,7 +6,7 @@ Program Client;
|
|||||||
sock_cli to connect to that socket
|
sock_cli to connect to that socket
|
||||||
}
|
}
|
||||||
|
|
||||||
uses Sockets,Linux;
|
uses Sockets,BaseUnix;
|
||||||
|
|
||||||
procedure PError(const S : string);
|
procedure PError(const S : string);
|
||||||
begin
|
begin
|
||||||
|
@ -6,7 +6,7 @@ Program server;
|
|||||||
sock_cli to connect to that socket
|
sock_cli to connect to that socket
|
||||||
}
|
}
|
||||||
|
|
||||||
uses Linux,Sockets;
|
uses BaseUnix,Sockets;
|
||||||
const
|
const
|
||||||
SPath='ServerSoc';
|
SPath='ServerSoc';
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ begin
|
|||||||
S:=Socket (AF_UNIX,SOCK_STREAM,0);
|
S:=Socket (AF_UNIX,SOCK_STREAM,0);
|
||||||
if SocketError<>0 then
|
if SocketError<>0 then
|
||||||
Perror ('Server : Socket : ');
|
Perror ('Server : Socket : ');
|
||||||
UnLink(SPath);
|
fpUnLink(SPath);
|
||||||
if not Bind(S,SPath) then
|
if not Bind(S,SPath) then
|
||||||
PError ('Server : Bind : ');
|
PError ('Server : Bind : ');
|
||||||
if not Listen (S,1) then
|
if not Listen (S,1) then
|
||||||
@ -45,5 +45,5 @@ begin
|
|||||||
Readln(Sin,Buffer);
|
Readln(Sin,Buffer);
|
||||||
Writeln('Server : read : ',buffer);
|
Writeln('Server : read : ',buffer);
|
||||||
end;
|
end;
|
||||||
Unlink(SPath);
|
FPUnlink(SPath);
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user