<div dir="ltr">If you decice upon the server-client architecture, you should take a look at zeromq.<div>It is used extensively in IHaskell, so you can peek at the code there for a working example.<div><br></div><div>Also, I believe a client-server architecture will be better as I personally enjoy games a lot more when they are multi-player.</div><div>It makes the conversion from single-player to multi-player a non-destructive (or atleast less destructive) process.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 March 2015 at 15:02, Elise Huard <span dir="ltr"><<a href="mailto:haskell@elisehuard.be" target="_blank">haskell@elisehuard.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to do the following: implementing a command-line interface<br>
to directly interact with the state or the parameters of a<br>
looping/running process (a game, to be specific).<br>
<br>
My first thought is to fork a thread, passing in a TChan/TVar or<br>
similar to enable communication, and to have the command-line<br>
interface on the thread (getLine or haskelline ...).<br>
Another option would be to have a bona fide server-client interface<br>
(with sockets or others), to fork a thread again to run the server and<br>
to connect using the client library - which would allow me to use ghci<br>
and have transparent serialization under the hood.<br>
<br>
Are there known use cases?  Am I missing something, for instance is it<br>
possible to interact with a running process directly using ghci?<br>
Any tips?<br>
<br>
Thank you,<br>
<br>
Elise<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Regards</div><div dir="ltr"><div><br></div><div>Sumit Sahrawat</div></div></div></div></div></div></div>
</div>