C# Windows Mobile 6.5 and TCP connections
- by Phillip
Hello,
I am developing an application which makes a TCP connection out to our company server to pull down data and provide real-time data updates when the information changes.
I am using the .NET Compact Framework for the development and the .NET Framework 3.5 (soon to update to 4.0) for the server-side TCP connection.
I want to leave the connection open after the initial data is sent to the device from the server in order to keep the server in contact with the device should data updates need to be sent to the device. We already considered doing a WCF or connect/disconnect type of connection but we believe the overhead on the server for creating the session, transmitting and session cleanup would be unacceptable. (each device would be connecting every 60-90 seconds.) So, leaving the connection open is the best option.
What I need to know is, when I leave the TCP connection open, do I need to manually transmit a heartbeat (and if so how do I do that with the .NET Compact Framework) or will the framework/stack do that for me?
We have code that allows up to reconnect if the device gets disconnected (from network switching or a voice call) so that is handled.
Thanks,