Can someone point me in the direction as to setting up socket events in c-sharp?
Thanks
Tom
Printable View
Can someone point me in the direction as to setting up socket events in c-sharp?
Thanks
Tom
Have a look at my C# FTP server : it might help you.
http://www.codeguru.com/Csharp/Cshar...cle.php/c7409/
There's no such thing as a socket event. Sockets in C# do either a blocking Receive or an overlapped (or multithreaded) BeginReceive. There is no event which is fired when a socket receives a message.
You could always write one of course, and it'd be a really good idea to do so, but you're going to have to do it yourself.
Hopefully my C# FTP server will give you enough information (by running debug builds) for you to progress forwards.
Darwen.
Thanks I'll take a look at your FTP server.
I'm not realy concerned about receiving an event when data is received, as much as when the socket gets disconnected.
I'm still stuck in the MFC days where the CAsyncSocket class had all those events.
Thanks