mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:06:18 +02:00
+ TSocketStream now uses recv/sendto instead of read/write
This commit is contained in:
parent
64fb522791
commit
dd0d04e20f
@ -49,6 +49,8 @@ type
|
|||||||
Constructor Create (AHandle : Longint);virtual;
|
Constructor Create (AHandle : Longint);virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function Seek(Offset: Longint; Origin: Word): Longint; override;
|
function Seek(Offset: Longint; Origin: Word): Longint; override;
|
||||||
|
Function Read (Var Buffer; Count : Longint) : longint; Override;
|
||||||
|
Function Write (Const Buffer; Count : Longint) :Longint; Override;
|
||||||
Property SocketOptions : TSocketOptions Read FSocketOptions
|
Property SocketOptions : TSocketOptions Read FSocketOptions
|
||||||
Write SetSocketOptions;
|
Write SetSocketOptions;
|
||||||
end;
|
end;
|
||||||
@ -224,6 +226,26 @@ begin
|
|||||||
Result:=0;
|
Result:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Function TSocketStream.Read (Var Buffer; Count : Longint) : longint;
|
||||||
|
|
||||||
|
Var
|
||||||
|
Flags : longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Flags:=0;
|
||||||
|
Result:=recv(handle,Buffer,count,flags);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function TSocketStream.Write (Const Buffer; Count : Longint) :Longint;
|
||||||
|
|
||||||
|
Var
|
||||||
|
Flags : longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Flags:=0;
|
||||||
|
Result:=send(handle,Buffer,count,flags);
|
||||||
|
end;
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
TSocketServer
|
TSocketServer
|
||||||
---------------------------------------------------------------------}
|
---------------------------------------------------------------------}
|
||||||
@ -520,7 +542,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.15 2003-03-07 20:57:09 michael
|
Revision 1.16 2003-03-10 21:42:39 michael
|
||||||
|
+ TSocketStream now uses recv/sendto instead of read/write
|
||||||
|
|
||||||
|
Revision 1.15 2003/03/07 20:57:09 michael
|
||||||
+ Use resolve unit instead of inet unit.
|
+ Use resolve unit instead of inet unit.
|
||||||
|
|
||||||
Revision 1.14 2002/12/18 18:39:14 peter
|
Revision 1.14 2002/12/18 18:39:14 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user