RTC Forums
November 23, 2024, 11:26:33 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: HttpGateClient reconnect event...  (Read 4615 times)
byte
Newbie
*
Posts: 4


« 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.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 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
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.