From: Joel VanderWerf Date: 2010-11-03T01:15:53+09:00 Subject: Re: Local server-client communication On 11/02/2010 07:51 AM, Javier 12 wrote: > Hi, i'm coding a linux local server (daemon) and it will have a command > line tool to communicate with it. > > What I want to accomplish is something like iptables tool, you write > some rules on the command line and they are sent to the "daemon", in > this case the kernel module. > > How can I achieve it? I've seen ruby does not support mkfifo, and a > solution based on system() calls is really ugly. > > Unix socket? plain file? > > what do you use? > thanks in advance Unix sockets are fine for this purpose. You can write your own protocol on top of them, or use druby (assuming the client is in ruby too).