Next: , Previous: exercise-scm-mol, Up: Scheme Scripting Functions


13.30 remote-control

— procedure: %coot-listener-socket

a place-holder for the coot listener socket

— procedure: open-coot-listener-socket port-number host-name

Open a coot listener socket, return nothing much, but do set! %coot-listener-socket.

Hmmm... why make a side-effect like that? Why not return %coot-listener-socket so that the caller can set it? There may be a reason...

And the reason is that I can then call coot-listener-idle-function-proc without having to use a c++ variable.

— procedure: open-coot-listener-socket-with-timeout port-number host-name

yet another go to make a coot port reader work. This time, we use a gtk-timer to read stuff from the socket.

The gtk-timer function must return 1 to be called again. When we want to close the socket reader, simply make the function return 0.

— procedure: coot-socket-timeout-func

based on coot-listener-idle-function-proc

— procedure: coot-listener-idle-function-proc

Do this thing when idle

currently set to listen to the %coot-listener-socket

— procedure: eval-socket-string s

the function to run from the main thread to evaluate a string: