Subj: Problem controlling Writer remotely -- Please help

Lars Doelle lars.doelle at on-line.de
Fri Aug 16 05:21:08 PDT 2013


Hi Stephan,

thanks for your reply.

> > Seeking a solution, i write to ask for help to this mail-list. Two
> > solutions appear to be possible (in order of preference):
> >
> > 1) Use com.sun.star.connection.Acceptor to create a TCP-server within
> >     LibreOffice. Our problem is how to make this event-driven. Is is
> >     this possible at all?
> 
> Not sure I get your scenario right.

What i want to do is to setup a TCP-server from within LibreOffice that is able
to read and send raw data over the wire using some Basic routine processing
it in between.

Now my question is how to use the LibreOffice-infrastructure best to create
a TCP-server? Can it be done from Basic using the Acceptor interface at all? Should
i better use a python-script, create a listening thread and then call the processing
Basic-macro, or what else?


> If you want the LibreOffice 
> (soffice) process to accept incoming connections, just start it with an 
> --accept=... command line argument.  (The resulting 
> css.connection.Acceptor is running in its own thread then, to not block 
> anything else while waiting for connections, see 
> desktop/source/offacc/acceptor.{hxx,cxx}.)

If you say above some '--accept=<parameter>' magic would already create
a silly TCP-server that passes all connections accepted to some Basic routine
for further read and write i would definitely love to learn more about this trick.

Unfortunately, i didn't find any syntax or options for the '<parameter>'. We're
using "--accept=socket,host=0,port=2002;urp;", but this implies UNO-marshalling,
which we want to get rid of for reasons outlined in the original mail.

Right now i hesitate to download the sources to check the file you've pointed me
at, mainly because LibreOffice is so huge. If the acceptor.[ch]xx files really contain
the relevant information for my purpose, please simply confirm, that this is the way
to go.

-- Lars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130816/6e7142bb/attachment.html>


More information about the LibreOffice mailing list