LibreOffice
LibreOffice 6.2 SDK API Reference
Public Member Functions | List of all members
XConnection Interface Referencepublished

A bidirectional bytestream. More...

import"XConnection.idl";

Inheritance diagram for XConnection:
XInterface XConnection2

Public Member Functions

long read ([out] sequence< byte > aReadBytes, [in] long nBytesToRead) raises ( com::sun::star::io::IOException )
 reads a requested number of bytes from the connection. More...
 
void write ([in] sequence< byte > aData) raises ( com::sun::star::io::IOException )
 writes the given bytesequence to the stream. More...
 
void flush () raises ( com::sun::star::io::IOException )
 Empties all internal buffers. More...
 
void close () raises ( com::sun::star::io::IOException )
 Immediately terminates any ongoing read or write calls. More...
 
string getDescription ()
 A unique string describing the connection. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

A bidirectional bytestream.

You should additionally implement XConnection2.

See also
XConnection2

Member Function Documentation

void close ( )
raises (com::sun::star::io::IOException
)

Immediately terminates any ongoing read or write calls.

All subsequent read or write calls()

void flush ( )
raises (com::sun::star::io::IOException
)

Empties all internal buffers.

string getDescription ( )

A unique string describing the connection.

This string is different from the arguments to XConnection::accept() and XConnector::connect(). In general, the string contains an additional handle value. For example, "socket,host=localhost,port=2002,uniqueValue=2324".

long read ( [out] sequence< byte >  aReadBytes,
[in] long  nBytesToRead 
)
raises (com::sun::star::io::IOException
)

reads a requested number of bytes from the connection.

This method is blocking, meaning that it always returns a bytesequence with the requested number of bytes, unless it has reached end of file (which often means, that close() has been called).

please see also the readSomeBytes() method of XConnection2.

Returns
The read number of bytes. The return value and the length of the returned sequence must be identical.
Parameters
aReadBytesThe buffer to receive the read bytes.
nBytesToReadThe number of bytes to be read from the stream.
Exceptions
com::sun::star::io::IOExceptionin case an error occurred during reading from the stream.
void write ( [in] sequence< byte >  aData)
raises (com::sun::star::io::IOException
)

writes the given bytesequence to the stream.

The method blocks until the whole sequence is written.

Exceptions
com::sun::star::io::IOExceptionin case an error occurred during writing to the stream.

The documentation for this interface was generated from the following file: