EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ClientSSLSocket Receive problem

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#5044
Posted: 02/18/2008 07:23:26
by Andrew Milne (Standard support level)
Joined: 06/16/2006
Posts: 18

Hello,

I've developed a client application using the ElClientSSLSocket object. Everything appears to be working correctly, except that any "larger" responses from the server are not being received correctly by my app.

For example, one command I issue to the server should be returning a response of 1711 bytes. I am using async BeginReceive which I call after sending. This fires the callback, which I am using EndReceive to get the number of bytes and finish the receive.

My code reads the received data, and then checks ElClientSSLSocket.Available to see if there is anything else to receive. If so, it calls BeginReceieve again. Having debugged the app, I know this works - if I set the buffer to a small size, then it will go through the receive procedure until no more is on the socket.

However, with the command that returns 1711 bytes, I am getting 1460 initially (so 251 to go), but when my code checks ElClientSSLSocket.Available, it is zero. I have tried putting a sleep command in, but this does not help.

When I issue another command after this, the next response returns the missing 251 bytes instead of the next response.

I have tried adjusting the buffer to no avail. I currently have it set to 4096. It almost seems like the socket buffer is not working correctly - ie, its received but not making it available.

Am I doing something wrong? Any suggestions on what I could try?

Many thanks
#5046
Posted: 02/18/2008 08:25:07
by Eugene Mayevski (EldoS Corp.)

Moved to HelpDesk.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1105 times

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




|

Back to top

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

Got it!