Local server-client communication

J

Javier 12

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
 
J

Joel VanderWerf

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).
 
R

Roger Pack

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).

Drb might work for you, as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top