[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Aug 5 01:29:32 1993 
Subject:Re: Prodding Ved from the Outside 
From:Richard Caley 
Volume-ID:930805.01 

I don't know about the details of XVed, but assuming it is hooked into
the normal Xt event loop, you should be able to use XtAddInput to tell
it to call a procedure of yours when input occurs on a socket. It's
easy enough to create an internet family socket. Then you just decide
on a simple protocol to let a client program say `please execute this
pop expression' and get the result back. 

As Scott Wheeler says, there is an emacs equivalent. I use it to have
my mailer use my running emacs to edit messages. Andy Norman's
`gnuserv' package is the thing to look at if you want ideas, but all of
the non-emacs related stuff is fairly obvious. I presume the same
would be true for a Ved version -- getting the commands executed at
the right point in ved's input loop and managing the requests when you
have them to get the right answer back to the right client will be the
fun bit. As I remember, gnuserv works by having a child process of
emacs listening at the socket and it then talks to the emacs process.
This way the emacs/poplog knows where the input is going to come from
rather than having to think about multiple clients.

At the risk of stating the obvious... this is a big security hole if
you don't protect it some way. It's easy enough to imitate the MIT
magic cookie security that is all most people have on their X server.

      ^_^
     (O O) 
     \_/@@\
      \\~~/ 
        ~~
		- RJC