Another question about OpenOffice (and component based programming in general)




I understand that in UNO (and COM, and CORBA...) the programmer can
"inspect" or "interrogate" the components in order to find ways to
communicate ("send messages") to them.

The OpenOffice process can be run in either (a) named-pipe mode, or
(b) listening to some particular socket mode. According to all the
code I have seen, the programmer has to know those details in advance.
IOW, if my program is going to connect the OO server via socket 8100
(some sort of convention), it has to be started like this:

"C:\Program Files\OpenOffice.org 2.3\program\soffice" -
accept=socket,host=0,port=8100;urp;

The server has to be started to accommodate my code, and think it
should be the other way around. I would like my client program to be
as general and flexible as possible. If I understand component-based
programming, I don't have to know a lot of stuff in advance, because
the components themselves will provide the details. I just don't know
what the correct "questions" are.

These are the first 5 lines of a typical OO client program (not drawn
to scale!):

(1) xContext = Bootstrap.bootstrap(); // starts OO process (plus
Windows icon) if not already running
(2) XMultiComponentFactory xMCF = xContext.getServiceManager();
(3) createInstanceWithContext("com.sun.star.bridge.BridgeFactory");
(4) xConnector = (XConnector)
UnoRuntime.queryInterface(XConnector.class, x);
(5) connection = xConnector.connect(con); <-- finally!, there is TCP/
IP communication here

where 'con' can be something like: "socket,host=localhost,port=8100"
or "pipe,name=whatever".

Notice that it is not only after step (4) that finally a regular TCP/
IP connection is established. How do they talk in steps (2-4)? Beats
me, I am sure is not telegraph or smoke signals, the point is that
there is some sort of communication going on. In fact, does anyone
know how they solve this chicken-and-egg issue?

But let's go to the...

Main Question:

Can I insert some statement between steps (4) and (5) in which I ask
the OO server: what kind of IPC mode are you using: named pipe or
socket? If pipe: what is the name of the pipe? If socket, what socket
number are you using?

-Ramon

.



Relevant Pages

  • Re: TCP Streams from Unknown source to VB.Net
    ... communicate with any types of other platforms on TCP/IP communication. ... the data structure is sent in binary format out over a socket. ... can't contain arrays. ... from the server. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: stop Socket.BeginReceive before comlpete
    ... Peer-to-Peer Communication Across Network Address Translators ... you will also need the socket to listen to the ... coordinate the two clients). ... Can you enlaborator how did you listen to the Server? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: creating server socket program to handle multiple client at same time
    ... > if no then select is only thing to have server socket program on one ... > pc and other clients on many pcs to have communication with server? ... accept returns a socket file descriptor ... forking a child you can have a select call and pass this descriptor to ...
    (comp.unix.programmer)
  • Re: Winsock & IO Completion problem
    ... And it's not a problem to have server and client on both ... I am implementing a communication framework, ... 5.Associate the socket B with the thread pool. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Inter-process communication, how? Part 2
    ... You could also drain the pipe in a script using ... To solve that "problem" with socket in use error, ... SO_REUSEADDR socket option in the server before calling bind. ... the client finishes the connection normally, ...
    (comp.lang.python)