CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2002
    Location
    St.Louis, MO
    Posts
    27

    How to setup Socket Events

    Can someone point me in the direction as to setting up socket events in c-sharp?

    Thanks
    Tom
    Thanks
    Tom Wright

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: How to setup Socket Events

    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.
    Last edited by darwen; October 25th, 2005 at 04:46 PM.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  3. #3
    Join Date
    Sep 2002
    Location
    St.Louis, MO
    Posts
    27

    Re: How to setup Socket Events

    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
    Thanks
    Tom Wright

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured