G
G
Greendq2012-12-19 16:51:44
Mootools
Greendq, 2012-12-19 16:51:44

Dispatching incoming connections in C#?

Hey!

I must say right away that I have read, read and will read chapter 27 of Stevens “UNIX: Network Application Development” (both books of the cycle are on the table). And I know the solution in pure C under Unix.

Now, actually, the question is:

How can I dispatch incoming connections for a server with a main and child processes so that each child process can serve several clients at the same time? It doesn't matter if child processes will be asynchronous or multi-threaded.
The question is, _HOW_ to pass connected socket(s) to child processes for servicing? Preferably within the Mono framework, so that the solution is not strongly tied to the platform.

I am not interested in a specific example, but in links where this is all described in detail, with examples, with an explanation of the nuances and pitfalls.

The task is simple - to serve a certain set of clients with several instances of the server, the protocols are UDP and / or TCP (although, logically, this is not important at all).

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Greendq, 2012-12-20
@Greendq

Are all the pros sleeping or am I asking a stupid question?

S
shai_hulud, 2012-12-20
@shai_hulud

in detail is not for dotnet.
there is an alternative - one process balancer / multiplexer (it holds real sockets) and a bunch of processes that work with it via IPC (unix-sockets, shared memory, pipes).

G
Greendq, 2012-12-21
@Greendq

There is no pure solution, which in essence is the answer to the question.

K
Kano, 2013-01-05
@Kano

Perhaps I did not fully understand the question, but perhaps this will help you - msdn.microsoft.com/ru-ru/library/system.net.sockets.socket.duplicateandclose.aspx

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question