PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

sockets and pipes


Your Ad Here

Your Ad Here

sockets and pipes.... 5193
Captain Dondo I worked on a system that ran a lot of terminals (advanced telephone sets connected to Dialogic boards), switches (more Dialogic boards), etc. What we did...
sockets and pipes.... 5194
BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Dondo Sounds like your master process will have at least two threads: one for prioritizing and...

I've got a socket-pipe question....

I have a master process that communicates with a whole bunch of hardware (things like temperature sensors, position sensors, switches, and so on.)

I also have some number of processes that need to either get the status of that hardware or to control it somehow (i.e. get a temperature reading or turn a switch on).

I've been playing with named pipes and sockets but I can't help but think I am reinventing the wheel....

Essentially the conversations between the processes are very simple. Master process listens. Client makes a request (what is the temperature?). Master process responds (It's 37 degrees.). Client closes connection.

I'd like to set up something like a pty structure, where the client and master communicate. When the client starts, it requests a connection. The master process buttigns it a socket or a pair of pipes, on which the conversations will thake place.

Speed is not an issue; the communication bus the master process is connected to runs at the leisurely speed of 800 bits per second. Reliability is essential; I cannot have either the client or the server block forever or die. Right now I am using pthreads - the client launches a timeout thread, then a listen thread. Then it waits for the timeout thread. If the listen thread completes, it kills the timeout thread. Otehrwise the listen thread is end once the timeout thread expires.

I've been playing with pipes and sockets but I can't help but think I am reinventing the wheel. Does anyone know of a library that implements something like this - along with all of the error checking and all that?

Thanks,

--Yan



Your Ad Here

List | Previous | Next

sockets and pipes.... 5193

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

FC4: Device problems