From f17523c2f2a4f5a6e5435495e0aa4c47127996c4 Mon Sep 17 00:00:00 2001 From: mateusvicente100 Date: Mon, 22 Jun 2020 15:28:17 -0300 Subject: [PATCH] Update Bird.Socket.Connection.pas --- src/Bird.Socket.Connection.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Bird.Socket.Connection.pas b/src/Bird.Socket.Connection.pas index 6aad725..7d16b7a 100644 --- a/src/Bird.Socket.Connection.pas +++ b/src/Bird.Socket.Connection.pas @@ -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; @@ -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;