473,569 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sockets question...

....or maybe more of a basic networking question:

I need to create a protocol that will allow multiple instances of my
executable (on one PC only) to synchronize with each other.
i.e.: when a setting in one instance of the program changes, I want all of
the other running instances of that program to get the info, & vice versa.

If I use Sockets, I need to keep a port available to send a message out when
I need to, but also continuously monitor for any incoming messages. I
thought the UDPClient would be a good solution, but the Receive method
blocks until incoming data is available, thereby locking up the port if I
need to send something out.

It looks like I could do this with the Socket class, TCP protcol, and async
read methods, but it seems more complicated than I require.

Is there a simpler way to send and recieve messages between applications? If
not, perhaps a good sample out there on asynchronously reading network
streams?

TIA,
Norvin
Nov 16 '05 #1
2 1050
Norvin Laudon wrote:

Is there a simpler way to send and recieve messages between applications?
If not, perhaps a good sample out there on asynchronously reading network
streams?


http://www.codeproject.com/csharp/Do...PipesPart1.asp
Nov 16 '05 #2
Hi

In case anyone is interested, I found a great article which describes a very
_simple_ way of passing serializable data between two applications on the
same machine.

http://www.vbaccelerator.com/home/NE...on/article.asp

(The "Named Pipes" sample suggested in the message below is anything but
simple...)

NL
"bowman" <bo****@montana .com> wrote in message
news:36******** *****@individua l.net...
Norvin Laudon wrote:

Is there a simpler way to send and recieve messages between applications? If not, perhaps a good sample out there on asynchronously reading network streams?


http://www.codeproject.com/csharp/Do...PipesPart1.asp


Nov 16 '05 #3

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

Similar topics

4
2146
by: 0to60 | last post by:
I have a question about socket programming in general. Exactly what happens behind the scenes when I one socket connects to a different socket in listen mode? Using the dotnet framework, I create a socket, bind it to a port, put it in listen mode, and then n sockets can connect to it. The code: Socket newSocket =...
7
2298
by: Bill English | last post by:
How do I send an object from one computer to another? -- I am a 14 year old C# developer, I am completely self taught, so please don't get mad if I ask a stupid question. Thanks.
4
312
by: 0to60 | last post by:
I have a question about socket programming in general. Exactly what happens behind the scenes when I one socket connects to a different socket in listen mode? Using the dotnet framework, I create a socket, bind it to a port, put it in listen mode, and then n sockets can connect to it. The code: Socket newSocket =...
3
1490
by: derSchweiz | last post by:
Hi, Experimenting with sockets, and I think I got it half working. I have the following code: Private Sub socket_receive(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated Dim bytesRec As Integer Dim i As Integer = 0 Dim data1 As Net.Sockets.Socket = cidServer.Accept() 'this line is
0
1147
by: richard.charts | last post by:
Well, unfortunately, I couldn't get any answer on the msdn forums, so I'll give it a shot here. Real question at the bottom. --------------------------------------------------------------------------------------------- What new functionality is added to this feature in Windows XP Service Pack 2? Restricted traffic over raw sockets ...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.