Blocking problem
- From: "Jamal" <samed000@xxxxxxxxx>
- Date: Thu, 26 Nov 2009 19:45:27 +0100
Someone had experience with tcp socket communication with implentation of
ssl.
The environment is Windows Mobile 6.1 CFW 3.5
Without ssl I have made PDA application which communicates to server, sends
and receives messages, detects broken connection both gracefull and
ungracefull.
The next step was to implement ssl for the same functionality.
Here comes the trouble: certificates has been implemented, handshaking
between server and client goes well. By the way server is XP based
application and client windows mobile. The client can connect to several
servers with preconfigured IP addresses and ports.
Then comes the problem with blocking. It seems that Blocking property of the
socket works only before connecting.
But OK, I have implemented assynchronious connecting, receiving and sending.
Receiving and sending always have conflicting with each other giving some
socket exception (10036 something is in progress)
I have tried working though begin/end operation of socket, of underlying
stream, of created networkstream attached to existing socket.
Nothing helps, blocking problem is still there.
The only way I have managed to avoid conflicts was: whenever I like to send
something from the client, I call EndRead method of the socket, on the
callback by abortion I just exit method
Then during the call EndRead the client receives amount received bytes, the
data is extracted from buffer. After these actions I can without problem
send data to server and call BeginRead.
It works with one problem: it is very slow, some sendings goes relative
quick and some very long.
The messages contains 50-200 bytes. the quick sending takes 100-150 ms and
long up to 10sec.
The test mesurement shows that the problem is the calling EndRead, the rest
execution code takes ~50 ms at least not more
the only stacking place is the EndRead call
The server works perfect, I have tested without ssl and with ssl (however in
ssl case the test client was also based on XP and desktop)
Probably someone had the same or nearby experience or any idea.
It will be greatly appreciated.
Jamal
.
- Prev by Date: Re: CF 1 / C# how to invoke with arguments?
- Next by Date: HRESULT: 0x8007007E occur at FindFirstDevice
- Previous by thread: Re: CF 1 / C# how to invoke with arguments?
- Next by thread: HRESULT: 0x8007007E occur at FindFirstDevice
- Index(es):
Relevant Pages
|