<div class="gmail_quote">2012/3/8 Neil Van Dyke <span dir="ltr">&lt;<a href="mailto:neil@neilvandyke.org">neil@neilvandyke.org</a>&gt;</span></div><div class="gmail_quote"><br></div><div class="gmail_quote"><div>Thanks for taking the time to look at the problem.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It sounds like Maxima and your Racket program are both trying to be the TCP listener.  Maybe &quot;tcp-connect&quot; instead of &quot;tcp-listen&quot;?<br>
</blockquote><div><br></div><div>I am fairly sure that part is correct. I do receive the welcome message from Maxima. And I took a peek in the Maxima code to see what -s does.</div><div>This comment is from the Maxima code:</div>
<div><br></div><div><div>;; Connect Maxima to a socket which has been opened by</div><div>;; some third party, typically a GUI program which supplies</div><div>;; input to Maxima.</div><div>;; Note that this code DOES NOT create a Maxima server:</div>
<div>;; Maxima is the client!</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Once that&#39;s working, for robustness, you might want to manage some TCP I/O buffers yourself, and use &quot;sync&quot; (or &quot;sync/timeout&quot; or similar) on the ports.  Using the buffers also makes it easier to look for some markers in the protocol without blocking.<br>
</blockquote><div><br></div><div>I&#39;ll look into this. I did run into blocking problems in earlier versions of my snippet. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

P.S., I know you used that &quot;process&quot; temporarily here, but for the benefit of people who see this later, they should try to use &quot;process*&quot; instead, and monitor the status of the ports and the process (possibly in the same &quot;sync&quot; as the TCP ports).<br>
</blockquote><div> </div><div>Ok.</div><div><br></div><div>/Jens Axel</div><div><br></div></div>