Event Driven socket programming

  • Thread starter Thread starter Michael D. Ober
  • Start date Start date
M

Michael D. Ober

In VB 6 and MFC, the socket classes support event driven architectures such
that when data arrives, the data arrival event is fired and you can process
the code. Is there a similar method in VB 2005 or the .NET Framework 2.0?

Thanks,
Mike Ober.
 
Michael said:
In VB 6 and MFC, the socket classes support event driven architectures such
that when data arrives, the data arrival event is fired and you can process
the code. Is there a similar method in VB 2005 or the .NET Framework 2.0?

Thanks,
Mike Ober.
Sure, have a look at the BeginReceive/EndReceive methods.

HTH,
Stefan
 
Michael said:
In VB 6 and MFC, the socket classes support event driven
architectures such that when data arrives, the data arrival event is
fired and you can process the code. Is there a similar method in VB
2005 or the .NET Framework 2.0?

You mean that if data arrives at a socket your code will be run? No,
there's nothing like that with the Socket class nor any of the higher
level classes based on sockets (none of them have events).

Richard
 
Are there better examples of these than the ones in the VS 2005 help system?

Mike.
 
Thanks. In that case, does the callback execute on the same thread as the
one that set up the callback?

Mike.
 
Back
Top