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
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.