Some changes for OS/2
This commit is contained in:
parent
f72b920e48
commit
c64481a7ed
|
@ -394,7 +394,12 @@ End;
|
||||||
Function TIOSocket.ReadBuf (Var Buf; Len: LongInt) : LongInt;
|
Function TIOSocket.ReadBuf (Var Buf; Len: LongInt) : LongInt;
|
||||||
Begin
|
Begin
|
||||||
If FInBufPos = FInBufEnd Then Begin
|
If FInBufPos = FInBufEnd Then Begin
|
||||||
FInBufEnd := fpRecv(FSocketHandle, @FInBuf, TIOBufferSize, FPRECVOPT);
|
{$IFDEF OS2}
|
||||||
|
FInBufEnd := Winsock.Recv(FSocketHandle, @FInBuf, TIOBufferSize, FPRECVOPT);
|
||||||
|
{$ELSE}
|
||||||
|
FInBufEnd := fpRecv(FSocketHandle, @FInBuf, TIOBufferSize, FPRECVOPT);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
FInBufPos := 0;
|
FInBufPos := 0;
|
||||||
|
|
||||||
If FInBufEnd <= 0 Then Begin
|
If FInBufEnd <= 0 Then Begin
|
||||||
|
@ -444,7 +449,7 @@ Begin
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// Data := Ord(Not Block);
|
// Data := Ord(Not Block);
|
||||||
// Result := ioctlSocket(FSocketHandle, FIONBIO, Data);
|
// Result := ioctlSocket(FSocketHandle, FIONBIO, Data);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -541,7 +546,12 @@ Begin
|
||||||
If fpListen(FSocketHandle, 5) = -1 Then Exit;
|
If fpListen(FSocketHandle, 5) = -1 Then Exit;
|
||||||
|
|
||||||
Temp := SizeOf(SIN);
|
Temp := SizeOf(SIN);
|
||||||
Sock := fpAccept(FSocketHandle, @SIN, @Temp);
|
|
||||||
|
{$IFDEF OS2}
|
||||||
|
Sock := Winsock.Accept(FSocketHandle, @SIN, @Temp);
|
||||||
|
{$ELSE}
|
||||||
|
Sock := fpAccept(FSocketHandle, @SIN, @Temp);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
If Sock = -1 Then Exit;
|
If Sock = -1 Then Exit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue