944,110 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 5756
  • ASP.NET RSS
Feb 9th, 2005
0

suitability of .net for tcp/ip server

Expand Post »
Hi,

I am interested in comments / experience people have wrt writing a tcp server in .net.

We currently have existing an existing server, written in native c++. It communicates with our own browser client using a proprietery protocol and services hundreds / thousands of concurrent connections. The server uses blocking sockets in multiple threads to obtain reasonable performance.

We have had management requests to move from native code to .net code.

I am fairly confident that we could do the clients in .net.
However, I am unsure about the suitablility of .net for the server. In particular wrt cpu usage.
Similar Threads
Reputation Points: 10
Solved Threads: 2
Newbie Poster
kon_t is offline Offline
17 posts
since Feb 2005
Feb 23rd, 2005
0

Re: suitability of .net for tcp/ip server

.NET for writing TCP servers requires that you use a multi-threaded approach. However this is easy to do so you should be able to achieve good performance on P4 class machines.

At the packet level it depends on whether your PDUs are ASCII or binary. If ASCII the stream functions make it really easy. If binary packets with a routing header, you will need to call the WSock2 functions for network byte order conversion.

To give you an example of performance, I developed a TCP server that takes a stream of PBX events from 1-500 clients (agents). After that a new instance of the Server is required; hence my server also load balances. The avg packet size is 60 bytes, largest is around 300 bytes. My server parses the packets in real-time and dispatches these to Web application clients. In essence, my server is more of a gateway. With that in mind I can tell you the simplicty of C# makes getting the framework of the application a snap.
Reputation Points: 10
Solved Threads: 3
Light Poster
mcldev is offline Offline
31 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Same application not working on all machines
Next Thread in ASP.NET Forum Timeline: where to put .asp code into html code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC