Skip to content

Commit

Permalink
Update Bird.Socket.Connection.pas
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusvicente100 committed Jun 22, 2020
1 parent 8837dc3 commit f17523c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Bird.Socket.Connection.pas
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ TBirdSocketConnection = class
function WaitMessage: string;
function IPAdress: string;
function Id: Integer;
function CheckForDataOnSource(const ATimeOut: Integer): Boolean;
function Connected: Boolean;
procedure Send(const AMessage: string); overload;
procedure Send(const ACode: Integer; const AMessage: string); overload;
procedure Send(const ACode: Integer; const AMessage: string; const AValues: array of const); overload;
Expand All @@ -24,6 +26,16 @@ TBirdSocketConnection = class

implementation

function TBirdSocketConnection.CheckForDataOnSource(const ATimeOut: Integer): Boolean;
begin
Result := FIdContext.Connection.IOHandler.CheckForDataOnSource(ATimeOut);
end;

function TBirdSocketConnection.Connected: Boolean;
begin
Result := FIdContext.Connection.Connected;
end;

constructor TBirdSocketConnection.Create(const AIdContext: TIdContext);
begin
FIdContext := AIdContext;
Expand Down

0 comments on commit f17523c

Please sign in to comment.