help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sending messages to an already-running instance of octave


From: Pantxo Diribarne
Subject: Re: sending messages to an already-running instance of octave
Date: Sun, 18 Jun 2017 20:50:57 +0200



2017-06-18 20:27 GMT+02:00 Dan Hitt <address@hidden>:
On Sun, Jun 18, 2017 at 10:26 AM, Pantxo <address@hidden> wrote:

> Hi,
>
> Please write your answers at the bottom of quoted messages (bottom posting),
> it is the custom on this list.
>
> Octave can be made to execute a function periodically: see
> "add_input_event_hook". With this function you can probably fake a server
> client communication from a single instance of Octave.
>
> Pantxo
>

Thanks Pantxo.

I'll try to bottom post any future communication.

And will investigate add_input_event_hook.

So i guess the idea would be to write first write function which
checks a well-known location in the file system, reads and deletes
what's there, and responds accordingly.  Then i would schedule that
function with add_input_event_hook.  Maybe could even put the code to
do all this in my init file, and have a lock in it somewhere so that
only the first octave i run will actually do the checking.


Yes, that is basically what I would do. For a more sophisticated (and network based) server/client logic I would look at "socket" or "zeromq" packages in octave-forge:

https://octave.sourceforge.io/sockets/index.html
https://octave.sourceforge.io/zeromq/index.html

Pantxo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]