Event Driven socket programming

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.
 
S

Stefan Simek

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
 
R

Richard Grimes

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
 
M

Michael D. Ober

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

Mike.
 
M

Michael D. Ober

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

Mike.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top