471,344 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,344 software developers and data experts.

how to do WaitForSingleObject (win32) in c# ? (pb to receive FD_ACCEPT,FD_READ and a custom event)

Hi everybody;

I've done 2 c++ class; server and client.
I would like to make the same in c#.

my waiting thread was waiting for 3 type of event:
- a socket have data to read
- a socket want to be accepted (by the listening socket)
- the event from the destructor of the class to stop the waiting thread

all of this was done with the WaitForSingleObject function, and all was OK.

The same methode in c# seems to be Socket.Select(), but i can't detect
for special event (like 'stop everything') with this method. And use
Socket.Select() with a delay of 1 second seems to be not very optimised.

What do you think of that ?
What solution ?

thanks
Jul 21 '05 #1
0 7552

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Victor | last post: by
4 posts views Thread by NutJob | last post: by
5 posts views Thread by Simon Middlemiss | last post: by
2 posts views Thread by T McDonald | last post: by
2 posts views Thread by trialproduct2004 | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.