EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElHttpsClient timeout handling

Posted: 06/22/2012 17:08:52
by Luis Arenal (Standard support level)
Joined: 06/22/2012
Posts: 3

I'm using TElHttpsClient to post messages to a server and it is very important for the logic of my application to tell whether a timeout occurred when trying to establish connection to the server or while waiting for the response from the server, in other words, if it was not possible to get the server's response due to a timeout, at least it must know whether the request message reached the server or not. Is there a way to do this? I will appreciate your help.

Thank you very much.
Best regards,
Luis Arenal.
Posted: 06/23/2012 01:46:22
by Eugene Mayevski (Team)

The data sent by your application first reaches local network stack, then is transferred via the wire, then loaded into remote network stack and finally picked by the server application. The only way to know that server application has picked the data is to receive some confirmation from it. Consequently there's no reliable way to know at what point the data are if timeout has happened.

The best idea for the client is to identify each request and when the request is retransmitted, have it identified with the same identifier as in previous attempt. The server should keep track of IDs of messages and discard requests with duplicate IDs.

Sincerely yours
Eugene Mayevski
Posted: 06/25/2012 10:32:32
by Luis Arenal (Standard support level)
Joined: 06/22/2012
Posts: 3

Thanks for your answer Eugene, one last thing, if the exception raised at the client side is a 'Connection timeout', can I be certain that the data wasn’t picked by the server application?

Thank you,
Luis Arenal
Posted: 06/25/2012 11:50:05
by Eugene Mayevski (Team)

Unfortunately no. Disconnection could happen after the server has picked the request but before it delivered the reply. Or the server could just crash while rendering the reply (for example).

So no assumptions can be made and what I described above is the most reliable scheme.

All of the above is the generic rule of client-server programming, not specific to HTTP or other protocol.

Sincerely yours
Eugene Mayevski
Posted: 06/25/2012 11:53:35
by Vsevolod Ievgiienko (Team)


This exception is thrown when your client application waits for data from a server but doesn't receive it until a timeout elapses, so it can't be used to check if data was picked by the server application.
Posted: 04/08/2015 08:38:53
by Triboulin Didier (Standard support level)
Joined: 04/08/2015
Posts: 4


After reducing the timeout to 5000 milliseconds, an exception is encountered when calling :

httpCode = this.HttpsClient.Post (this.RequestUri.AbsoluteUri, requestStream, false);

HttpsClient is of TElHTTPSClient type and the exception is of ThreadAbortException after a NullReferenceException in this stack trace :

at SBSocket.TElSocket.OnSocketConnectCallback(IAsyncResult ar)
at System.Net.LazyAsyncResult.InvokeCallback(Boolean asyncCompletion)
at System.Net.Sockets.Socket.WorkerThread.doWork()
at System.Net.Sockets.Socket.WorkerThread.doWorkI(Object o)
at System.Threading.ThreadPool.WorkItem.doWork(Object o)
at System.Threading.Timer.ring()

This results in the termination of the application, do you know what could be the problem?

Thank you in advance.
Posted: 04/08/2015 08:53:46
by Vsevolod Ievgiienko (Team)

Triboulin Didier,

Thank you for contacting us.

Could you please clarify:

1) what SecureBlackbox version do you use?
2) is the problem reproducible with our samples?

Also could you post NullReferenceException call stack here.

I’ve noticed there is no license ticket linked to your user account on EldoS site. Technical Support is provided to customers with the linked license tickets. You will find your license ticket together with all the details about how to use it in the registration e-mail that we’ve sent to you upon the purchase.

If you are evaluating the product and don't have a license yet, please let us know and then you can get support Basic support level. Basic support level includes answering basic technical questions that appear during product evaluation period.
Posted: 04/08/2015 09:15:50
by Triboulin Didier (Standard support level)
Joined: 04/08/2015
Posts: 4

1) At the moment this is a trial version related to the "Windows Mobile" environment. The company I work for had a ticket for a version called "SecureBlackbox .NET, SSLBlackbox client package, ultimate license" but this was not sufficiently high. A replacement is in progress ...

2) I have not had the opportunity to use the samples, the tests are performed in the direction of an Apache server which has stopped its services on TCP port 443.

I can not get the call history in the lower layer providing the connectivity. I note just in the output a redundancy of SBSimpleSSL.EElSSLClientConnectionLostError exceptions encountered in SecureBlackbox.SSLClient.dll.

I'll try the operation via one of the examples to the targeted server.
Posted: 04/08/2015 09:23:33
by Eugene Mayevski (Team)

Triboulin Didier wrote:
"SecureBlackbox .NET, SSLBlackbox client package, ultimate license" but this was not sufficiently high. A replacement is in progress ...

This license is OK for the functionality you are describing now, and the mentioned license covers any number of developers in your organization.

Regarding your problem - we will try to reproduce it and let you know the outcome.

On a side note - your original question is not a continuation of the 3-year-old topic, so it would fit better to start a new topic in this case. We will continue to work on the issue in this topic, but anyway.

Sincerely yours
Eugene Mayevski
Posted: 04/09/2015 02:13:39
by Vsevolod Ievgiienko (Team)

1) At the moment this is a trial version related to the "Windows Mobile" environment.

Could you clarify if you use Windows Mobile or Windows Phone as both can be refered as "Windows Mobile". We need to know exactly as different assemblies sets are used for these platforms.



Topic viewed 5478 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!