C# TCPIP non blocking server

  • Thread starter Thread starter Mike Sharp
  • Start date Start date
M

Mike Sharp

I'm fairly new to the C# scene, having been a VB6 programmer for what seems
like a age (I used to push VB6 to its absolute limits when handling numerous
connections from TCPIP sources).

I'm looking for some fairly straight forward examples showing how I can
create a non-blocking .NET C# application that can:

- handle hundreds of connections per minute
- read the incomming stream from multiple sources simultaneously and write
it to a SQL Server 2005 database
- read the database for any updates and send it to the respective source
- close the socket.

I have seen a few chat examples on the web, but would they stand up to that
kind of punishment?

Thanks

(e-mail address removed)
(remove the no spam to reply directly).

Thanks
 
You're asking for a straight forward example of a very complex set of
requirements. I am not sure if that's possible.

There are several technologies in the .Net framework that you need to look
at. First, to handle the number of connections you're looking for, in a
non-blocking fashion, you need to look into the ThreadPool class and
asynchronous sockets.

There's a great chat example from the .Net Framework SDK samples that
installs, at least on my pc, at C:\Program Files\Microsoft Visual Studio
..NET 2003\SDK\v1.1\Samples\Technologies\DelegatesAndEvents\cs.

HTH

DalePres
MCAD, MCDBA, MCSE
 
Back
Top