Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
AnswerRe: The WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
Dave Kreskowiak30-May-10 11:50
mveDave Kreskowiak30-May-10 11:50 
AnswerRe: The WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
PIEBALDconsult30-May-10 17:34
mvePIEBALDconsult30-May-10 17:34 
AnswerRe: The WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
Jeff Kissinger31-May-10 10:05
Jeff Kissinger31-May-10 10:05 
QuestionBlocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 7:40
Hamed Musavi30-May-10 7:40 
AnswerRe: Blocking vs. Non-Blocking Socket efficiency? Pin
PIEBALDconsult30-May-10 8:12
mvePIEBALDconsult30-May-10 8:12 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 8:17
Hamed Musavi30-May-10 8:17 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
PIEBALDconsult30-May-10 16:19
mvePIEBALDconsult30-May-10 16:19 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 8:53
Hamed Musavi30-May-10 8:53 
I probably didn't ask a true question (according to the title).

I am designing a socket server. Some clients will connect to it and transfer data to and from this server. Connections must be kept alive for long times and there will probably be as much as hundreds of connections.

I was comparing different ways to do it and was asking myself which one is better. There are blocking vs. non-blocking solutions. To use blocking API calls and keep server ready for more accepts, a common approach seems to be having one or more threads or processes per connection. Blocking calls like Receive and Send will be handled in those threads/processes.

On the other hand many people suggest that this method is not efficient so a better approach is to use asynchronous APIs like BeginSend.

This raised the question in my mind that which one is really more efficient?

"I hope you live a life you're proud of. If you find that you're not, I hope you have the strength to start all over again."    
 - I wish I knew who is this quote from
 

AnswerRe: Blocking vs. Non-Blocking Socket efficiency? Pin
harold aptroot30-May-10 9:00
harold aptroot30-May-10 9:00 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 9:02
Hamed Musavi30-May-10 9:02 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
harold aptroot30-May-10 9:13
harold aptroot30-May-10 9:13 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
harold aptroot30-May-10 9:26
harold aptroot30-May-10 9:26 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 9:28
Hamed Musavi30-May-10 9:28 
AnswerRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Luc Pattyn30-May-10 10:23
sitebuilderLuc Pattyn30-May-10 10:23 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 18:25
Hamed Musavi30-May-10 18:25 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Luc Pattyn31-May-10 1:48
sitebuilderLuc Pattyn31-May-10 1:48 
QuestionUnix Time Pin
jojoba201130-May-10 7:39
jojoba201130-May-10 7:39 
AnswerRe: Unix Time Pin
PIEBALDconsult30-May-10 8:34
mvePIEBALDconsult30-May-10 8:34 
AnswerRe: Unix Time Pin
Kristian Sixhøj30-May-10 9:09
Kristian Sixhøj30-May-10 9:09 
QuestionRe: Unix Time Pin
jojoba201130-May-10 21:07
jojoba201130-May-10 21:07 
AnswerRe: Unix Time Pin
Kristian Sixhøj31-May-10 2:34
Kristian Sixhøj31-May-10 2:34 
GeneralRe: Unix Time Pin
Daniel Grunwald31-May-10 8:14
Daniel Grunwald31-May-10 8:14 
AnswerRe: Unix Time Pin
PIEBALDconsult31-May-10 5:25
mvePIEBALDconsult31-May-10 5:25 
Questionignore special chars in string Pin
michaelgr130-May-10 7:11
michaelgr130-May-10 7:11 
AnswerRe: ignore special chars in string Pin
Hamed Musavi30-May-10 7:14
Hamed Musavi30-May-10 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.