| | |
suitability of .net for tcp/ip server
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2005
Posts: 17
Reputation:
Solved Threads: 2
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.
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.
•
•
Join Date: Feb 2005
Posts: 31
Reputation:
Solved Threads: 2
.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.
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.
![]() |
Similar Threads
- best way to create a TCP server that can hold 1500 connections? (C#)
- Senior C#.Net Developer - Oxfordshire - ASP. Net, VB / Net - SQL Server (Web Development Job Offers)
- VB.NET Sql Server database file (VB.NET)
- Senior C#.Net Software Engineer - Oxfordshire - ASP. Net / SQL Server (Web Development Job Offers)
- asp.net developer server problem.. (ASP.NET)
- connection problems with vb.net and sql server (VB.NET)
- dreamweaver/ asp.net /sql server help needed please!!! (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Same application not working on all machines
- Next Thread: where to put .asp code into html code
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net box browser button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose fileuploader fill flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols radio ratings redirect registration relationaldatabases reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





