blob: be37cc8f40fef4e64b93343d300531729e996eab [file] [log] [blame] [view] [edit]
Inter-Process Communication (IPC) for client-server applications can be
accomplished using
[UNIX sockets](http://en.wikipedia.org/wiki/Unix_domain_socket).
Both client and server need to use the same path for the socket.
{common.rs}
The client program:
{client.rs}
The server program:
{server.rs}
Let's test the programs
```
$ rustc client.rs; rustc server.rs
# Terminal 1
$ ./server
Server started, waiting for clients
# Terminal 2
$ ./client hello
# Terminal 1
Server started, waiting for clients
Client said: hello
```