473,324 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Event Driven socket programming

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.

Dec 30 '05 #1
4 2590
Michael D. Ober wrote:
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
Dec 30 '05 #2
Michael D. Ober wrote:
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
--
Fusion Tutorial: http://www.grimes.demon.co.uk/workshops/fusionWS.htm
Security Tutorial:
http://www.grimes.demon.co.uk/workshops/securityWS.htm
Dec 31 '05 #3

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

Mike.

"Stefan Simek" <si**********@triaxis.nospam.sk> wrote in message
news:uy**************@TK2MSFTNGP11.phx.gbl...
Michael D. Ober wrote:
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


Jan 1 '06 #4
Thanks. In that case, does the callback execute on the same thread as the
one that set up the callback?

Mike.

"Richard Grimes" <ri******@mvps.org> wrote in message
news:ex**************@TK2MSFTNGP11.phx.gbl...
Michael D. Ober wrote:
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
--
Fusion Tutorial: http://www.grimes.demon.co.uk/workshops/fusionWS.htm
Security Tutorial:
http://www.grimes.demon.co.uk/workshops/securityWS.htm


Jan 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: christopher diggins | last post by:
I just wrote an article on using template specializations for event-driven programming ( http://www.artima.com/weblogs/viewpost.jsp?thread=84958 ). Are there any other examples of this kind of...
1
by: Csaba Gabor | last post by:
Maybe someone has an idea about this... I have two PHP scripts and they would like to efficiently communicate (on a a callback or event driven basis) with each other. If these are CLI versions of...
14
by: Snor | last post by:
I'm attempting to create a lobby & game server for a multiplayer game, and have hit a problem early on with the server design. I am stuck between using a threaded server, and using an event driven...
4
by: AzizMandar | last post by:
C++ Event Coding Questions I have done some simple programs in C++ and read a lot of good C++ books (Including The C++ Programing Language, and C++ Primer) I am trying to understand and...
2
by: darthghandi | last post by:
I am trying to pass a socket object when an event is signaled. I have successfully bound to a network interface and listened on a port for incoming connection. I have also been able to accept...
0
by: shonen | last post by:
I'm currently attempting to connect to a shoutcast server pull down the information from here and then I'll parse it. I got this working with the httplib, which was great, the problem is I want...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
0
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is...
8
by: Brad Walton | last post by:
Hello. First post, but been doing a bit of reading here. I am working on a project in Java, but decided to switch over to C# after seeing some of the additional features I can get from C#. One of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.