Blocking problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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





.



Relevant Pages

  • Re: Antw: Re: LDAP Authentication Problem
    ... TLSv1 und wird auf einen SSL Client Hello Request mit TLSv1 nicht ... antworten anstatt ein SSLv3 Server Hello. ... the LDAP PAM module and the shadow package. ...
    (de.comp.sys.novell)
  • Re: Socket switch delay
    ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
    (microsoft.public.win32.programmer.networks)
  • SSL and IPS (was RE: ssh and ids)
    ... How many simultaneous SSL sessions can be tracked?" ... I assume you're talking about a case in which the client constantly ... If you walk the possible session id space and ... The server chooses the session ID, ...
    (Focus-IDS)
  • Re: Locking on async calls
    ... you must synchronize the entire SendMessage routine as an atomic ... operation to prevent mixed messages from being transmitted to the server. ... You are correct that read and write on the socket do not interfere with each ... If you want to handle multiple client connections from one server object ...
    (microsoft.public.dotnet.general)
  • Re: Design issue with WinSock/GetQueuedCompletionStatus
    ... delegate that to a shutdown routine called after all worker threads ... The application I've created is a server accepting connections on a few ... different TCP/IP ports and then lets the client run different commands. ... a TCP/IP socket can be closed for 2 different reasons: ...
    (microsoft.public.win32.programmer.networks)