<div dir="ltr">Thanks Allan - I (wrongly) assumed that it was good practice to avoid reopening the connection each time. Things do work fine with your suggested solution then.. now moving on to grammars and scopes :-)<div>Best, m </div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><br></div><div><br></div><div><br></div><div><br></div><div><font size="1" face="courier new, monospace" style="background-color:rgb(255,255,255)" color="#cccccc">----</font></div><div><font size="1" face="courier new, monospace" style="background-color:rgb(255,255,255)" color="#cccccc">Michele Pasin</font></div><div><font size="1" face="courier new, monospace" style="background-color:rgb(255,255,255)" color="#cccccc"><a href="http://www.michelepasin.org" target="_blank">http://www.michelepasin.org</a></font></div><div><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 3 October 2015 at 12:15, Allan Odgaard <span dir="ltr"><<a href="mailto:mailinglist@textmate.org" target="_blank">mailinglist@textmate.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 17 Sep 2015, at 1:03, Michele Pasin wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
The problem is, Python's pickle doesn't support all kinds of objects, and<br></span>
sockets are among those […] So I wonder if there's another way of approaching the problem; or, if by any chance, the same approach done via another language (eg Ruby) would not<br>
encounter any limitation.<br>
</blockquote>
<br>
I am not sure why you want to reuse the socket.<br>
<br>
The server will run and keep listening on port 7099.<br>
<br>
Each time you run the command, it will have to create a new connection to the server, but the server can keep state, as it will not terminate between connections/command invocations.<br>
<br>
You can use TM_DOCUMENT_UUID or TM_PROJECT_UUID as client ID for the server, so that the server can maintain a “session” per document/project.<br>
<br>
Creating a new connection to the server per request is not uncommon or expensive when server is running on localhost.<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" rel="noreferrer" target="_blank">http://lists.macromates.com/listinfo/textmate</a></div></div></blockquote></div><br></div>