EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Control over request stream on post

Posted: 01/18/2013 17:20:59
by Michael Bohan (Basic support level)
Joined: 01/18/2013
Posts: 1

I have a particular need for controlling the an https connection very closely. I have been trying out your library as it has some advantages over the .NET https client (HTTPWebRequest) for my purposes on the SSL side, but I am unclear how to tightly control the request stream with your product. If I pass a stream to the Post method, it appears to read the contents of the stream to the end and then close the connection without any opportunity to meter out the actual bytes of the request payload.

What I need to do is send most of the bytes of the payload, wait a period of time and then send another very small number of bytes. I need to set the content-length header as the payload is known in advance and I am not interested exactly in streaming to the server, but rather in controlling how and when the bytes from the known payload are sent.

With the .NET client, you can do this by turning off request buffering, writing directly to the request stream and then flushing the stream a byte at a time. How can I do the same thing with TElSimpleSSLClient?
Posted: 01/19/2013 01:20:44
by Ken Ivanov (Team)


I guess that the easiest way to achieve your goal is to use a proxy stream class. A proxy stream object (which you pass to TElHTTPSClient.Post() method) would be reading data from the base stream in response to Read() calls made by TElHTTPSClient object, and will make a pause after the needed amount of data has been passed on to TElHTTPSClient.



Topic viewed 651 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!