Re: [hatari-devel] Control socket server

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Dienstag, 1. Mai 2018 13:29:50 CEST tin@xxxxxxxxx wrote:
> I'm currently playing with this and it seems a bit of a hassle to have
> every control application implementation set up a server (like e.g. the
> PythonUI does).

I once tried to implement something similar in Aranym, and also thought that 
it would make more sense to implement the server in Hatari/Aranym rather than 
in the script/whatever controlling it. However, when using the gui script, 
this has several drawbacks:

- The script has to exec Hatari first, before it can connect to that socket
- It then has to wait for Hatari to create the listener, and accept 
connections to it
- Hatari itself then has to wait for the script to connect to that socket 
before continuing, otherwise embedding the window into the gui does not work.

That whole sequence is thus much more complicated, and not very reliable. You 
also have to use timeouts at several places, in case one of the steps goes 
wrong.

I think the proper solution would be to write the listener as a separate 
program, and have both Hatari and the gui connect to it. But that requires lot 
of changes.






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/