views:

23

answers:

1

I am writing an eclipse plug-in which will operate in a mode in which it will need to send "commands" to another C program. The C program has a built-in poller which checks for events. The plug-in will "push" commands out but doesn't need anything in response. What's the easiest way to set up a communication mechanism between these two? I was thinking about using a read-only fifo on the C side which I would check from the poller, but I'm not sure how to coordinate the reading and writing between the two processes. Does one of the processes need to block while the other is accessing it? If so, how do I coordinate this? Anyone know of any samples out there? I haven't quite turned up exactly what I am looking for in my searches.

+1  A: 

The simplest is probably just communicating over a socket connection, which allows you to use any network communication library for moving the actual bytes.

Thorbjørn Ravn Andersen