Results 1 to 3 of 3

Thread: Sockets & Delegates. . .

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    Sockets & Delegates. . .

    Well i am developing a bot that will download files from IRC and i am facing some problems that you might help me resolve.
    Before is tarted this IRC bot thing i had to design my own socket class and i did it through async delegates(instead of using threading).
    This raises me a BIG problem. If I try to connect to a wrong ip or something that would raise a bug when using async callbacks instead of raising the error in the line of code of the Connect() method it will raise it anywhere in the app(in the Application.Run(new MainFrm()) most of the times). Is there any work-around against this?

    I really hope I made myself clear otherwise just state it and I'll try to explain things better
    Last edited by PT Exorcist; Apr 12th, 2004 at 01:13 PM.
    \m/\m/

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    I would think a Try...Catch...Finally would deal with that wouldn't it?

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    That's what I'm saying, as when the delegate raises the error the code flow will not be anymore in the function that executed the Connect() but will be in the Application.Run(new MainFrm()) so putting the Try/catch thing won't resolve anything
    \m/\m/

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