by Thomas [agent_t at gmx dot net] posted on 2004/06/06 |
|
Hi,
I postet this some time ago, but have not received a useful answer yet. Could you please think about this problem again? Furthermore, I have some new aspects to tell..........
---
I've implemented a client/server application using the mentalis.org secure-sockets.
If I'm setting the secure-protocol to Ssl.SecureProtocol.None, everything is working fine.
But when I switch it to use ssl3 or tls1 and I deploy a certificate, some strange things occure.
After establishing the connection (this works fine), I can transfer a few bytes (in my case, some short ascii-characters), but suddenly, the connection hangs. When I invoke the securesocket.send method im my client application, the onDataReceive callback-method of my server doesn't fire an event.
I got the same (or better, a similar) behaviour earlier when using no secure protocol. The reason was, that the data I want to transmit is very short (e.g. ATQ or LNQ = mostly only a few letters). Since TCP seems to buffer some bytes, I reduced the receive-buffer to 1 byte. For non-ecrypted connections (Ssl.SecureProtocol.None), this works fine, but it seems to have no effect, when using a secure protocol.
Perhaps, you're using a bigger buffer-size internally? Or some kind of buffer is expanding, explaining, why the first packets go through an the beginning when the buffer/window is small. As the buffer/windows or something like that grows after some transmitted packets, the connection hangs?
Hoping, to get some feedback, since I don't have any further ideas .... |
by Pieter Philippaerts [Pieter at mentalis dot org] posted on 2004/06/20 |
|
> Since TCP seems to buffer some bytes,
> I reduced the receive-buffer to 1 byte
How exactly did you do this? Did you use SetSocketOption or IOControl methods? Using these methods with the securesocket is not encouraged since they have not been tested.
Also, if you can send me a small example program that shows the bug, I'd be happy to debug it. |