Async sockets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fernando

    #1

    Async sockets

    Is there anything or anyway to do something simmilar to WSAAsyncSelect which
    is asyncronous but the notifications comes in the same thread( throgh
    messages ) , which for simple things facilitates the programming logic ?

    Is there a group specific to System.Net.Sock ets ?


  • Peter Duniho

    #2
    Re: Async sockets

    On Wed, 17 Sep 2008 01:58:32 -0700, Fernando <FatalError0x4c @hotmail.com>
    wrote:
    Is there anything or anyway to do something simmilar to WSAAsyncSelect
    which
    is asyncronous but the notifications comes in the same thread( throgh
    messages ) , which for simple things facilitates the programming logic ?
    The Socket.Select() method is as close as you might get from a literal
    point of view.

    That said, using the asynchronous API (Socket.Begin.. .()/Socket.End...()
    methods) in conjunction with Control.Invoke( ) or Control.BeginIn voke()
    provides practically the same behavior as WSAAsyncSelect( ), but without
    the need for you to make up your own window messages.

    I would generally not bother using Invoke() or BeginInvoke() unless I
    actually needed to interact with a GUI object. But it's true that you
    _can_ use those methods as a form of lazy thread synchronization , if
    that's what you're trying to accomplish.
    Is there a group specific to System.Net.Sock ets ?
    Not that I know of. Many of the issues related to socket programming in
    ..NET are identical to Winsock more generally, so the Winsock newsgroups
    and resources (including the FAQ and MSDN section on Winsock 2) are
    relevant. But you wouldn't find answers to questions specific to .NET
    there.

    Pete

    Comment

    • Fernando

      #3
      Re: Async sockets

      Thanks.


      "Peter Duniho" <NpOeStPeAdM@nn owslpianmk.come screveu na mensagem
      news:op.uhmwsof 58jd0ej@petes-computer.local. ..
      On Wed, 17 Sep 2008 01:58:32 -0700, Fernando <FatalError0x4c @hotmail.com>
      wrote:
      >
      >Is there anything or anyway to do something simmilar to WSAAsyncSelect
      >which
      >is asyncronous but the notifications comes in the same thread( throgh
      >messages ) , which for simple things facilitates the programming logic ?
      >
      The Socket.Select() method is as close as you might get from a literal
      point of view.
      >
      That said, using the asynchronous API (Socket.Begin.. .()/Socket.End...()
      methods) in conjunction with Control.Invoke( ) or Control.BeginIn voke()
      provides practically the same behavior as WSAAsyncSelect( ), but without
      the need for you to make up your own window messages.
      >
      I would generally not bother using Invoke() or BeginInvoke() unless I
      actually needed to interact with a GUI object. But it's true that you
      _can_ use those methods as a form of lazy thread synchronization , if
      that's what you're trying to accomplish.
      >
      >Is there a group specific to System.Net.Sock ets ?
      >
      Not that I know of. Many of the issues related to socket programming in
      .NET are identical to Winsock more generally, so the Winsock newsgroups
      and resources (including the FAQ and MSDN section on Winsock 2) are
      relevant. But you wouldn't find answers to questions specific to .NET
      there.
      >
      Pete

      Comment

      Working...