Click here to Skip to main content
15,915,501 members
Home / Discussions / C#
   

C#

 
GeneralRe: close all XML nodes by defualt Pin
hamid_m3-Aug-07 2:43
hamid_m3-Aug-07 2:43 
GeneralRe: close all XML nodes by defualt Pin
Malcolm Smart3-Aug-07 3:20
Malcolm Smart3-Aug-07 3:20 
GeneralRe: close all XML nodes by defualt Pin
hamid_m3-Aug-07 3:44
hamid_m3-Aug-07 3:44 
GeneralRe: close all XML nodes by defualt Pin
Malcolm Smart3-Aug-07 3:49
Malcolm Smart3-Aug-07 3:49 
GeneralRe: close all XML nodes by defualt Pin
hamid_m3-Aug-07 3:54
hamid_m3-Aug-07 3:54 
GeneralRe: close all XML nodes by defualt Pin
PIEBALDconsult4-Aug-07 4:34
mvePIEBALDconsult4-Aug-07 4:34 
AnswerRe: close all XML nodes by defualt Pin
hamid_m4-Aug-07 5:16
hamid_m4-Aug-07 5:16 
QuestionAsynchronous UDPClient BeginReceive Method Pin
martin_hughes2-Aug-07 23:59
martin_hughes2-Aug-07 23:59 
Hey all,

I'm having trouble with the Asynchronous UDPClient.BeginReceive() method. I've finally gotten the (extremely poor) example in the MSDN docs working, however as soon as it receives any data the application quits, when ideally I'd want it to continue listening to the port.

To get around this, I simply call the method containing the call to BeginListen() again from the callback, but I'm having serious doubts about this as a preferred method of doing things, given that this method (and from MSDN) simply blocks in a while loop:

// Do some work while we wait for a message. For this example,
// we'll just sleep
while (!messageReceived)
{
  Thread.Sleep(100);
}


and without this "Do some work" business the application just quits again. Now this could actually be quite useful, as the reason I'm looking at this BeginReceieve stuff is so that I can terminate the listener as and when I want to, which seems a lot more tricky when using blocking port access.

So after all that rambling, is this the way it should be done, or have I hacked myself into a tight spot?


"It was the day before today.... I remember it like it was yesterday."

-Moleman


AnswerRe: Asynchronous UDPClient BeginReceive Method Pin
Guffa3-Aug-07 1:52
Guffa3-Aug-07 1:52 
GeneralRe: Asynchronous UDPClient BeginReceive Method Pin
martin_hughes3-Aug-07 2:38
martin_hughes3-Aug-07 2:38 
QuestionUpdating a form from a class ( same instance) problem Pin
Hardboiled862-Aug-07 23:58
Hardboiled862-Aug-07 23:58 
AnswerRe: Updating a form from a class ( same instance) problem Pin
Martin#3-Aug-07 1:34
Martin#3-Aug-07 1:34 
AnswerRe: Updating a form from a class ( same instance) problem Pin
Chintan.Desai3-Aug-07 2:57
Chintan.Desai3-Aug-07 2:57 
QuestionAVI frames to JPG or BMP conversion using C# Pin
sriathma2-Aug-07 23:46
sriathma2-Aug-07 23:46 
Questionopen file which can see inside of it Pin
nhathoang2-Aug-07 23:24
nhathoang2-Aug-07 23:24 
AnswerRe: open file which can see inside of it Pin
Christian Graus2-Aug-07 23:27
protectorChristian Graus2-Aug-07 23:27 
AnswerRe: open file which can see inside of it Pin
Manoj Kumar Rai2-Aug-07 23:53
professionalManoj Kumar Rai2-Aug-07 23:53 
GeneralRe: open file which can see inside of it Pin
nhathoang3-Aug-07 0:02
nhathoang3-Aug-07 0:02 
AnswerRe: open file which can see inside of it Pin
Chintan.Desai3-Aug-07 2:58
Chintan.Desai3-Aug-07 2:58 
QuestionCreate a telephone directory Pin
sgeorgije2-Aug-07 22:49
sgeorgije2-Aug-07 22:49 
AnswerRe: Create a telephone directory Pin
Christian Graus2-Aug-07 23:06
protectorChristian Graus2-Aug-07 23:06 
GeneralRe: Create a telephone directory Pin
sgeorgije2-Aug-07 23:12
sgeorgije2-Aug-07 23:12 
GeneralRe: Create a telephone directory Pin
Christian Graus2-Aug-07 23:21
protectorChristian Graus2-Aug-07 23:21 
AnswerRe: Create a telephone directory Pin
Manoj Kumar Rai2-Aug-07 23:15
professionalManoj Kumar Rai2-Aug-07 23:15 
GeneralRe: Create a telephone directory Pin
Colin Angus Mackay2-Aug-07 23:45
Colin Angus Mackay2-Aug-07 23:45 

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.