RTC Forums
November 23, 2024, 04:41:47 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Delayed call preventing application termination
Pages: [
1
]
« previous
next »
Print
Author
Topic: Delayed call preventing application termination (Read 4556 times)
DPerkins
RTC License
Posts: 37
Delayed call preventing application termination
«
on:
January 09, 2018, 06:34:24 PM »
I've just added delayed calls to our client application to enable the server to push events to the client. It works well.
When I exit my client application, I call:
TRtcHttpClient->DisconnectNow()
...prior to deleting the dynamically created RTC components. If I call the above on the TRtcHttpClient that I use for delayed calls, then the application hangs.
Is calling DisconnectNow() the correct procedure prior to deletion and if so, is there anything that can be called to prevent the hang when called on a RtcHttpClient with a delayed call in progress?
Using 7.62.
Thanks
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Delayed call preventing application termination
«
Reply #1 on:
January 09, 2018, 06:49:13 PM »
When using Delayed Calls, you will most likely have a request waiting for a response from the Server. If you do NOT want to wait for that response from the Server before you start closing the connection, you should call
DisconnectNow(TRUE)
to skip all pending requests and start closing the connection immediately, instead of waiting for all pending requests to finish before a connection is closed.
Here are all "
DisconnectNow
" method parameters, with their default values ...
(
SkipPendingRequests
:boolean=False;
_Timeout
:cardinal=0;
UserInteractionAllowed
:boolean=False;
AllowMessageProcessing
:boolean=True )
Best Regards,
Danijel Tkalcec
Logged
DPerkins
RTC License
Posts: 37
Re: Delayed call preventing application termination
«
Reply #2 on:
January 10, 2018, 11:20:22 AM »
Great, thanks.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...