Re: SocketServer design
From: William Stacey [MVP] (staceywREMOVE_at_mvps.org)
Date: 02/15/05
- Next message: Wayne: "Re: XmlSerializer"
- Previous message: Olle de Zwart: "Re: newbie question about text boxes"
- In reply to: Stuart: "SocketServer design"
- Next in thread: Chad Z. Hower aka Kudzu: "Re: SocketServer design"
- Reply: Chad Z. Hower aka Kudzu: "Re: SocketServer design"
- Reply: Stuart: "Re: SocketServer design"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Feb 2005 15:38:26 -0500
You can have more then 64 open sockets. That begs a question on how many
you can actually create per process? Anyone know for sure or is limited
only by memory? You probably want to use a thread pool as others have said
if you will have that many connections at same time (or use async sockets
which some really like and others don't like so much). An interesting
server that uses this method is the open source Cassini Web server by MS.
Also used in their WebMatrix tool. IIRC, it uses the std thread pool to
queue connections and handle them via the queue. Worth looking at for tips
on how others approached the issue.
http://www.asp.net/Projects/Cassini/Download/
"Explore and Extend the Cassini Web Server"
http://www.devx.com/dotnet/Article/11711/0/page/1
-- William Stacey, MVP http://mvp.support.microsoft.com "Stuart" <stuart@stu.org.uk> wrote in message news:37ekhtF59vg1qU1@individual.net... > I need to write a socket server that accepts around 100 connections, but > this could grow to a 1000, or more in time. The data throughput will be > minimal, mostly in short random bursts, but it's important those > connections stay active. > > Having googled a bit, I understand there is a limit of 64 socket > connections in .NET? How do you overcome that? Should I be creating a > new Thread for every connection? It seems a bit wasteful, given the > small amounts of data. (as little as 30 bytes in a 2 minute burst). > > Stuart.
- Next message: Wayne: "Re: XmlSerializer"
- Previous message: Olle de Zwart: "Re: newbie question about text boxes"
- In reply to: Stuart: "SocketServer design"
- Next in thread: Chad Z. Hower aka Kudzu: "Re: SocketServer design"
- Reply: Chad Z. Hower aka Kudzu: "Re: SocketServer design"
- Reply: Stuart: "Re: SocketServer design"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|