Click here to Skip to main content
15,921,660 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Forms Pin
Jon_Slaughter28-Jun-04 8:21
Jon_Slaughter28-Jun-04 8:21 
GeneralRe: Multiple Forms Pin
Heath Stewart28-Jun-04 8:57
protectorHeath Stewart28-Jun-04 8:57 
GeneralRe: Multiple Forms Pin
Jon_Slaughter28-Jun-04 9:16
Jon_Slaughter28-Jun-04 9:16 
GeneralRe: Multiple Forms Pin
Heath Stewart28-Jun-04 9:34
protectorHeath Stewart28-Jun-04 9:34 
GeneralRe: Multiple Forms Pin
Jon_Slaughter28-Jun-04 11:14
Jon_Slaughter28-Jun-04 11:14 
GeneralRe: Multiple Forms Pin
Heath Stewart28-Jun-04 11:27
protectorHeath Stewart28-Jun-04 11:27 
GeneralMulticast Programming Pin
goodpilot28-Jun-04 6:25
goodpilot28-Jun-04 6:25 
GeneralRe: Multicast Programming Pin
Heath Stewart28-Jun-04 6:47
protectorHeath Stewart28-Jun-04 6:47 
goodpilot wrote:
Does anyone have an answer to this other than "use 4 separate machines"?

Yes - don't use multiple processes. Multiple processes will not necessarily solve the problem and will most likely add to it. Each process has significant overhead: it's own process space, handles, thread queues, and in this case a separate instance of the CLR loaded. The common, "more correct" approach would be to use worker threads. You can either use the Thread class or the ThreadPool.QueueUserWorkItem (recommended; read about thread pools in the ThreadPool class documentation) to split the work. You could even make this configuration at launch time using the .config file for the application. This will use significantly less memory, cause the CPU to perform better in regard to your application (it's not switching to time-slice between multiple applications - on threads), and give you greater control...not to mention solve your problem (since one process is listening to the socket).

So, all data would be received by the UdpClient (it would anyway - you're just processing in chunks). Just chunk the data to one of N number of worker threads. This is actually how most socket servers work that you'll find any information about, and they can service hundreds or even thousands of connections.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Multicast Programming Pin
goodpilot28-Jun-04 7:35
goodpilot28-Jun-04 7:35 
GeneralGetting a ConfigurationException and I dont know why Pin
Flack28-Jun-04 6:18
Flack28-Jun-04 6:18 
GeneralRe: Getting a ConfigurationException and I dont know why Pin
Heath Stewart28-Jun-04 6:25
protectorHeath Stewart28-Jun-04 6:25 
GeneralRe: Getting a ConfigurationException and I dont know why Pin
Flack28-Jun-04 6:35
Flack28-Jun-04 6:35 
Questionhow to retrieve the ProductCode? Pin
econnor28-Jun-04 6:15
econnor28-Jun-04 6:15 
AnswerRe: how to retrieve the ProductCode? Pin
Heath Stewart28-Jun-04 6:21
protectorHeath Stewart28-Jun-04 6:21 
GeneralRe: how to retrieve the ProductCode? Pin
econnor29-Jun-04 3:53
econnor29-Jun-04 3:53 
GeneralEnumerations (design question) Pin
mealnumberone28-Jun-04 5:44
mealnumberone28-Jun-04 5:44 
GeneralRe: Enumerations (design question) Pin
Heath Stewart28-Jun-04 6:33
protectorHeath Stewart28-Jun-04 6:33 
Questionneed to send within the current connection ..? Pin
Adel83k28-Jun-04 5:18
Adel83k28-Jun-04 5:18 
AnswerRe: need to send within the current connection ..? Pin
Heath Stewart28-Jun-04 6:29
protectorHeath Stewart28-Jun-04 6:29 
GeneralWindows Service App Pin
japanreddy28-Jun-04 4:37
japanreddy28-Jun-04 4:37 
GeneralRe: Windows Service App Pin
Heath Stewart28-Jun-04 4:55
protectorHeath Stewart28-Jun-04 4:55 
GeneralRe: Windows Service App Pin
Xiangyang Liu 刘向阳28-Jun-04 5:17
Xiangyang Liu 刘向阳28-Jun-04 5:17 
GeneralFolderBrowserDialog external machine selection Pin
fozzwald28-Jun-04 4:29
fozzwald28-Jun-04 4:29 
GeneralRe: FolderBrowserDialog external machine selection Pin
Heath Stewart28-Jun-04 4:46
protectorHeath Stewart28-Jun-04 4:46 
GeneralProblem with EnvDTE Pin
Johan Van Antenaeken28-Jun-04 4:25
Johan Van Antenaeken28-Jun-04 4:25 

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.