Philippe Joyez | 9 Jun 2012 10:11
Favicon

socket communications

Hi

I'd like to initiate a socket connection to texmacs from an outside application,
but for the moment no luck.

Using (server-start) I can start a socket server in texmacs and then I can
establish a connection to it from another application. I am sure that the
communication is established because the "server" says "connection received from
127.0.0.1" or so in the console and texmacs can send [using server-write] data
to my app.

 However as soon as the connection is established, the texmacs instance has a
very high cpu usage and I cannot manage to receive any data in the server
[(server-read xx) gives nothing - here xx is the client number you get from
(server-clients)].  I don't know about real debugging techniques, but by adding
a few cout << in the code I could figure that the server is constantly polling
the socket (hence the high load) but never seems to receive any data...

So the questions are : Has anyone ever used socket communication to talk to a
texmacs instance and could give me a hint? Is the constant polling by design or
the sign that something is broken?

Best,
Philippe
Joris van der Hoeven | 2 Jul 2012 14:35

Re: socket communications

Hi Philippe,

As I said in an email yesterday, we are blocked at Ecole polytechnique for
making TeXmacs services available to the exterior.  This has reduced our
motivation to work on this issue to zero.  We are trying to solve this
administrative problem, but some people seem to be paid to make our
lives impossible...

Best wishes, --Joris

On Sat, Jun 09, 2012 at 08:11:56AM +0000, Philippe Joyez wrote:
> I'd like to initiate a socket connection to texmacs from an outside application,
> but for the moment no luck.
> 
> Using (server-start) I can start a socket server in texmacs and then I can
> establish a connection to it from another application. I am sure that the
> communication is established because the "server" says "connection received from
> 127.0.0.1" or so in the console and texmacs can send [using server-write] data
> to my app.
> 
>  However as soon as the connection is established, the texmacs instance has a
> very high cpu usage and I cannot manage to receive any data in the server
> [(server-read xx) gives nothing - here xx is the client number you get from
> (server-clients)].  I don't know about real debugging techniques, but by adding
> a few cout << in the code I could figure that the server is constantly polling
> the socket (hence the high load) but never seems to receive any data...
> 
> So the questions are : Has anyone ever used socket communication to talk to a
> texmacs instance and could give me a hint? Is the constant polling by design or
> the sign that something is broken?
(Continue reading)


Gmane