Results 1 to 3 of 3
Hi all,
I want to have a program running on Machine A as daemon mode, another program will ask this program about some information from Machine B. Wish protocol to ...
- 07-29-2008 #1
connect two programs on two different machines
Hi all,
I want to have a program running on Machine A as daemon mode, another program will ask this program about some information from Machine B. Wish protocol to use ? anybody has an example how to do this, i used to connect two applications on the same machine using DBus, but i've never done the connection between two machines.
by the way it's a C program.
Please Help.
Regards.Linux is not only an operating system, it's a philosophy.
Archost.
- 07-30-2008 #2Just Joined!
- Join Date
- Jul 2008
- Posts
- 2
The best method that I know for processes on separate computers to communicate is through sockets. The daemon will run as a server--listening for socket connections and accepting them. The other will run as a client--connecting to the server. Hereafter, the methods to send and receive data are applicable by both processes. This may seem complicated, but its not that bad. Here is the best tutorial I have found: Beej's Guide to Network Programming
- 07-31-2008 #3Linux Newbie
- Join Date
- Feb 2008
- Location
- Bangalore, India
- Posts
- 112
netcat is a simple unix utility which reads and writes data across network connections.
In the simplest usage, "nc host port" creates a TCP connection to the given port on the given target host. Your standard input is then sent to the host, and anything that comes back across the connection is sent to your standard output.
- nileshCode:nc localhost port
bigunix.blogspot.com
Registered Linux User: #476440


Reply With Quote