(incubating) | The Free and Open Productivity Suite

Acceptor / Connector services

OpenOffice.org

Contents

Overview
Description
Adding connection types

Overview

The services com.sun.star.io.Acceptor and com.sun.star.io.Connector allow for establishing a bytestream connection between two processes. After establishing the connection, there is no longer a difference between the client and the server.

Connections may be used, for example, by a remote bridge.

Description

The acceptor-service (or server) allows listening on a resource for clients to connect. The connector-service (or client) allows for connecting to a "listening resource". Both services support socket and pipe connections. Pipes work only on the same computer, as they use shared memory for data transfer. Sockets work in a tcp/ip network environment. The string, for the connect/accept calls, has the following format:

     <kind of connection>,<parametername1>=<value1>,...
			

for example:

       socket,host=localhost,port=2000
Supported are the following:
Kinds of connection:
- socket : TCP/IP-sockets
- pipe :
Parameters for socket-connection:
- host: networkname of the computer
- port : TCP/IP-Port to listen on
- tcpNoDelay : socket-tcpNoDelay-flag
can be set to 1 or 0. Should be 1 for a UNO connection, as it may otherwise come two 200 ms delays under certain circumstances. Defaults to the system default (in general 0).
Parameters for a pipe-connection:
- name : the name of the pipe

The connector component may be reused to initiate connections to multiple processes. The acceptor component may only be used to listen on one resource. Subsequent calls to the accept method must pass the same connection description string.

Adding connection types

You can add your own connection type by implementing a service with the name com.sun.star.connection.Connector.<connection-type> and com.sun.star.connection.Acceptor.<acceptor-type> , where connection-type is the name to be used, instead of socket.

Author: Jörg Budischewski ($Date: 2004/11/27 08:53:24 $)
Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.