On 2006-02-24, Gerald W. Lester <Gerald.Lester@cox.net> wrote:
> Have your end of the application open a "server" socket. Have the user end
> connect to that socket, send us a message, then wait for a reply message.
> Your application's "server" command will be invoked when the user
> application connects, this will return to you a socket handle to talk to the
> user application. Read the message that the user application send and pop
> up a message.
>
> When your application is done and has the other file ready, send a message
> on the same socket to the user. When the user application gets the message,
> display a popup message.
Alternatively, use comm <http://wiki.tcl.tk/comm> to avoid having to deal
with explicit socket-handling, fileevent-handling and other necessary
bookkeeping. Each side would then just call the appropriate procedures
on the other side.
comm is so useful and robust that I normally advise folks around me to
think about using comm first for IPC, only falling back on manual socket
stuff for the really complicated stuff.
- Adrian
Received on Sun Apr 30 02:14:36 2006