RTC Forums

Subscription => Support => Topic started by: byte on September 05, 2016, 12:03:58 PM



Title: HttpGateClient reconnect event...
Post by: byte on September 05, 2016, 12:03:58 PM
Is there a way to get event on reconnecting?
In addition I need connection failed event to report connection state to user.


Title: Re: HttpGateClient reconnect event...
Post by: D.Tkalcec (RTC) on September 07, 2016, 08:06:52 AM
Here are the events you are looking for:

BeforeLogIn - Event called BEFORE the user Logs in to the Gateway and can be used for custom component setup.
* This event will be executed from within "Sender:TRtcConnection" component's Background Thread. If a part of your event code requires access to the GUI or Main Thread, set "WantGUI:=True" inside this event and the "BeforeLoginGUI" event will be executed from the Main Thread after this event.

AfterLoggedIn - Event called after the Client logs in to the Gateway.
* This event will be executed from within "Sender:TRtcConnection" component's Background Thread. If a part of your event code requires access to the GUI or Main Thread, set "WantGUI:=True" inside this event and the "AfterLoggedInGUI" event will be executed from the Main Thread after this event.
 
AfterLoginFail - Event called if the last Login attempt has failed.
If AutoLogin=True, a new Login attempt will be made.
If AutoLogin=False, no futher login attempts will be made.
* This event will be executed from within "Sender:TRtcConnection" component's Background Thread. If a part of your event code requires access to the GUI or Main Thread, set "WantGUI:=True" inside this event and the "AfterLoginFailGUI" event will be executed from the Main Thread after this event.

AfterLogOut - Event called if the Client has been logged out of the Gateway. This can either be because the Client has permanently lost connection and the UserID belonging to this Client is no longer valid, or because the Active property was set to FALSE to close the connection. If AutoLogin=True, a new Login attempt will be made. If AutoLogin=False, no futher login attempts will be made.
* This event will be executed from within "Sender:TRtcConnection" component's Background Thread. If a part of your event code requires access to the GUI or Main Thread, set "WantGUI:=True" inside this event and the "AfterLogOutGUI" event will be executed from the Main Thread after this event.

OnStreamReset - Input and Output Streams have been reset (closed and ready for the next re-connect attempt),
either because the "ResetStreams" method was called, or because Clients connection to the Gateway was lost.
A new connection attempt will be made after this event. Use this event for cleaning up Group Status information.
* This event will be executed from within "Sender:TRtcConnection" component's Background Thread. If a part of your event code requires access to the GUI or Main Thread, set "WantGUI:=True" inside this event and the "OnStreamResetGUI" event will be executed from the Main Thread after this event.

OnReadyAfterReset - Client is again ready to send data to the Gateway after the last Stream Reset.
Use this event to re-invite Users to your Groups and fix broken User relations.
* This event will be executed from within "Sender:TRtcConnection" component's Background Thread. If a part of your event code requires access to the GUI or Main Thread, set "WantGUI:=True" inside this event and the "OnReadyAfterResetGUI" event will be executed from the Main Thread after this event.

PS. This is a copy/paste from TRtcHttpGateClient's component declaration (rtcGateCli unit).

Best Regards,
Danijel Tkalcec