Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
GeneralIOCP with sockets in C#.net Pin
Babarsaeed1-Apr-05 17:41
Babarsaeed1-Apr-05 17:41 
GeneralRe: IOCP with sockets in C#.net Pin
Anonymous2-Apr-05 0:30
Anonymous2-Apr-05 0:30 
Generald Pin
penecilllin1-Apr-05 17:12
penecilllin1-Apr-05 17:12 
GeneralRe: resizing a window form to be larger than screen Pin
Ashok Dhamija1-Apr-05 18:32
Ashok Dhamija1-Apr-05 18:32 
Generalideas on multiselection in checked listboxes Pin
ekynox1-Apr-05 15:29
ekynox1-Apr-05 15:29 
GeneralRe: ideas on multiselection in checked listboxes Pin
Sebastian Schneider4-Apr-05 1:58
Sebastian Schneider4-Apr-05 1:58 
GeneralThreads.... Pin
Wilco01-Apr-05 13:19
Wilco01-Apr-05 13:19 
GeneralRe: Threads.... Pin
sniper506th2-Apr-05 7:51
sniper506th2-Apr-05 7:51 
You shouldn't need to use a thread for something like this. All you really need is a timer, with the event handler Tick() calling your listen() function.

If you're set on threads, you would create a thread somewhere in your class:

Thread mythread

and then when you're ready to run the function,

<br />
mythread = new Thread(new ThreadStart(listen));<br />
mythread.Start();<br />
mythread.Join(System.TimeSpan(0,0,10));<br />
mythread.Abort();<br />


The listen function would write to a global or semi-global string, that you would read into your program. The System.TimeSpan object can be whatever you want (its how long that function has to run).

I would still use timers for this, you would use threads to allocate a given time for your client to connect to an IRC server.

Hope that helped,

Jimmy Sawczuk
www.McJournal.org
GeneralList COM+ components in Windows 2003 Pin
Johny Ng1-Apr-05 12:55
Johny Ng1-Apr-05 12:55 
GeneralMarshall structure with array Pin
Ox53746F6E651-Apr-05 12:06
Ox53746F6E651-Apr-05 12:06 
GeneralRe: Marshall structure with array Pin
rwestgraham3-Apr-05 10:20
rwestgraham3-Apr-05 10:20 
GeneralRe: Marshall structure with array Pin
Ox53746F6E655-Apr-05 20:01
Ox53746F6E655-Apr-05 20:01 
GeneralC# Setup and Deployment Winform App. Pin
rt71-Apr-05 11:57
rt71-Apr-05 11:57 
GeneralRe: C# Setup and Deployment Winform App. Pin
Dave Kreskowiak1-Apr-05 14:00
mveDave Kreskowiak1-Apr-05 14:00 
GeneralRe: C# Setup and Deployment Winform App. Pin
rt71-Apr-05 14:10
rt71-Apr-05 14:10 
GeneralRe: C# Setup and Deployment Winform App. Pin
Luis Alonso Ramos1-Apr-05 16:14
Luis Alonso Ramos1-Apr-05 16:14 
GeneralRe: C# Setup and Deployment Winform App. Pin
Dave Kreskowiak2-Apr-05 3:19
mveDave Kreskowiak2-Apr-05 3:19 
QuestionGlobals??? Pin
C# .NET Newbie1-Apr-05 11:27
sussC# .NET Newbie1-Apr-05 11:27 
AnswerRe: Globals??? Pin
Christian Graus1-Apr-05 11:45
protectorChristian Graus1-Apr-05 11:45 
GeneralWeb Services - c# chat application Pin
wakkerjack1-Apr-05 11:21
wakkerjack1-Apr-05 11:21 
GeneralCatastrophic failure Pin
webhay1-Apr-05 9:50
webhay1-Apr-05 9:50 
GeneralRe: Catastrophic failure Pin
Christian Graus1-Apr-05 11:50
protectorChristian Graus1-Apr-05 11:50 
GeneralRe: Catastrophic failure Pin
Dave Kreskowiak1-Apr-05 13:55
mveDave Kreskowiak1-Apr-05 13:55 
GeneralChanging Files Security Properties with C# Pin
markaelkins1-Apr-05 9:23
markaelkins1-Apr-05 9:23 
GeneralRe: Changing Files Security Properties with C# Pin
ACorbs1-Apr-05 11:18
ACorbs1-Apr-05 11:18 

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.