views:

100

answers:

2

I want to have my applications communicate to each other. I think something like a server-client model would suit me well, but I was also wondering if there was a different way. I want this way to not involve those windows event hooks.

A: 

You could loopback over Ethernet or use named pipes.

Look up Inter-process Communication (IPC) for a list of all related topics.

Edit: Given your comments about both being in different processes, then you are best off sending information across a network (ie sockets programming). This would give you the added advantage of being able to run the main process and the debug process on different machines. It's a bit hard to give you much information on it. You'll need to figure out what sort of requests you will send across the network and what sort of data you will send back in response. Effectively you need to design your own simple protocol.

Goz
Well I wanted to know more about anything relating to this, but the application I had in mind was a remote-debugging window for one of my projects.
Jeff
@Jeff: Does that mean the window is inside the same process?
Geoffrey Chetwood
Not sure what I got downvoted for here ...
Goz
No, the window isn't inside the same process. It's running independently of the calling application.
Jeff
@Jeff: Is it possible that it will need to run on a separate machine?
Geoffrey Chetwood
Whether it does or not is fairly immaterial. Sockets would be damned easy if it is local or if it is non-local ...
Goz
@Goz: It is very relevant. I can change my answer accordingly.
Geoffrey Chetwood
+2  A: 

Note:

I am assuming you want to communicate with different processes on the same machine, although many of these concepts can apply across computers as well.


What you are looking for is IPC (Inter Process Communication).

You can do IPC via:

  • File
  • Signal
  • Socket
  • Message queue
  • Pipe
  • Named pipe
  • Semaphore
  • Shared memory
  • Message passing
  • memory-mapped file

My personal recommendation is a loopback connection via socket commands. It is difficult to give you much help beyond that without knowing more details about what you want to do.

Geoffrey Chetwood
Thanks, I feel like there are more than enough answers to suit my needs in this thread.
Jeff