core: fixed compile errors when directive ONCEWINSOCK is not used
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@135 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
parent
d628e558ef
commit
08164958e5
17
blcksock.pas
17
blcksock.pas
@ -1,9 +1,9 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 009.008.003 |
|
| Project : Ararat Synapse | 009.008.004 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: Library base |
|
| Content: Library base |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)1999-2010, Lukas Gebauer |
|
| Copyright (c)1999-2011, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c)1999-2010. |
|
| Portions created by Lukas Gebauer are Copyright (c)1999-2011. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Contributor(s): |
|
| Contributor(s): |
|
||||||
@ -306,6 +306,9 @@ type
|
|||||||
FStopFlag: Boolean;
|
FStopFlag: Boolean;
|
||||||
FNonblockSendTimeout: Integer;
|
FNonblockSendTimeout: Integer;
|
||||||
FHeartbeatRate: integer;
|
FHeartbeatRate: integer;
|
||||||
|
{$IFNDEF ONCEWINSOCK}
|
||||||
|
FWsaDataOnce: TWSADATA;
|
||||||
|
{$ENDIF}
|
||||||
function GetSizeRecvBuffer: Integer;
|
function GetSizeRecvBuffer: Integer;
|
||||||
procedure SetSizeRecvBuffer(Size: Integer);
|
procedure SetSizeRecvBuffer(Size: Integer);
|
||||||
function GetSizeSendBuffer: Integer;
|
function GetSizeSendBuffer: Integer;
|
||||||
@ -2996,7 +2999,11 @@ end;
|
|||||||
|
|
||||||
function TBlockSocket.GetWsaData: TWSAData;
|
function TBlockSocket.GetWsaData: TWSAData;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF ONCEWINSOCK}
|
||||||
Result := WsaDataOnce;
|
Result := WsaDataOnce;
|
||||||
|
{$ELSE}
|
||||||
|
Result := FWsaDataOnce;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBlockSocket.GetSocketType: integer;
|
function TBlockSocket.GetSocketType: integer;
|
||||||
@ -4236,9 +4243,9 @@ end;
|
|||||||
|
|
||||||
{======================================================================}
|
{======================================================================}
|
||||||
|
|
||||||
{$IFDEF ONCEWINSOCK}
|
|
||||||
initialization
|
initialization
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF ONCEWINSOCK}
|
||||||
if not InitSocketInterface(DLLStackName) then
|
if not InitSocketInterface(DLLStackName) then
|
||||||
begin
|
begin
|
||||||
e := ESynapseError.Create('Error loading Socket interface (' + DLLStackName + ')!');
|
e := ESynapseError.Create('Error loading Socket interface (' + DLLStackName + ')!');
|
||||||
@ -4247,8 +4254,8 @@ begin
|
|||||||
raise e;
|
raise e;
|
||||||
end;
|
end;
|
||||||
synsock.WSAStartup(WinsockLevel, WsaDataOnce);
|
synsock.WSAStartup(WinsockLevel, WsaDataOnce);
|
||||||
end;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user