Hello coders
This is a small basic example how to make a simple TCP asynchronous Communication in C# under VS2008. I use Windows CE 5.0 and CF3.5 here.
The example let´s the client send a Telegramm and the server responds to that with a answer telegram including just a incremented counter value send back to the client. The Client was waiting to that and if received he starts next telegram and so on. So it is like a loop running forever.
To get it running you need start SmartDeviceServConnTest.exe and then the SmartDeviceClientConnectionTest.exe and then input the Server IP and press Begin Button.
The samples run on desktop and CE device(I have tested it with Netdcu8´s here). You see the number of send and received TCP Telegrams per second on both the Client and the server panel.
The example does not include thread safety ot any other error handling just to let it be as simple as it can be.
My question is to the people who have knowdledge and experience in socket communication like with this example. When I do this test between 2 Desktop PC´s I see about 2100 Telgrams per second. When I do the same between 2 NETDCU8´s I see only poor 100 Telegrams per second :(.
Is this usual or did I make some basic error n my code? The CPU usage is never above 60% so there seems to be some reserve in the NETDCU regarding the CPU.
I am about new to this issues so please help if you see any chance to improve performance becuase I wonder why there is factor 100 between desktop an NetDcu8 (about factor 10 I would have expected).
But may be it is like it is.
thanks a lot in advance
Andy