Re: Subj: Problem controlling Writer remotely -- Please help

2013-08-22 Thread Lars Doelle
On Friday, August 16, 2013 15:34:02 Stephan Bergmann wrote:
 On 08/07/2013 02:16 PM, Lars Doelle wrote:

Not sure I get your scenario right.
 
  What i want to do is to setup a TCP-server from within LibreOffice ...

 You can't do that with LibreOffice BASIC, but could do it with a 
 LibreOffice extension written in some language that allows to spawn 
 additional threads.

 [...]

 Ah, now I think I understand your original mail better---your problem 
 with incompatible Python versions means you want to replace the URP 
 communication between the two applications with something not using UNO.

Exactly, this is the point. We're already using our own RPC stuff for outgoing
communication and were using URP as a string tunnel for the incoming calls
only because we didn't manage to get a server going from within BASIC. Thus
the transport is asymmetric right now, which is not so nice from aesthetical
point of view, but worked well so far. Now the URP stuff broke for some python
embedded in a proprietary application, so its time to put things straight.


 In which case, forget what I wrote about --accept, and rather try to 
 create an extension as outlined above.

Stephan, thank you very much for your reply.
Now i think it's clear for us, which way to go  :^)

Kind regards

  Lars
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Subj: Problem controlling Writer remotely -- Please help

2013-08-16 Thread Lars Doelle
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
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Subj: Problem controlling Writer remotely -- Please help

2013-08-07 Thread Lars Doelle
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
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice