github.com/tv42/childrpc
is a utility package and demonstration of how to use the net/rpc
package to talk to things that are not typical TCP/IP servers.
You will need to have the github.com/tv42/moreio
package installed for it to work.
The example provided does one round of a simple ping-pong communication with the child process.
Here's how to run the example:
go get github.com/tv42/childrpc
cd $GOPATH/src/github.com/tv42/childrpc/example
go build
./example
You should see something like:
2013/04/16 09:33:15 parent mode
child: 2013/04/16 09:33:15 child mode
2013/04/16 09:33:15 got reply hello