UDK 3.2.7 C/C++ API Reference
|
A pipe to send or receive a stream of data. More...
#include <pipe_decl.hxx>
Public Member Functions | |
StreamPipe () | |
Creates an unattached pipe. | |
StreamPipe (oslPipe Pipe) | |
Creates pipe as wrapper around the underlying oslPipe. | |
StreamPipe (const StreamPipe &Pipe) | |
Copy constructor. | |
StreamPipe (const ::rtl::OUString &strName, oslPipeOptions Options=osl_Pipe_OPEN) | |
Creates a pipe. | |
StreamPipe (const ::rtl::OUString &strName, oslPipeOptions Options, const Security &rSec) | |
Creates a pipe. | |
StreamPipe (oslPipe pipe, __sal_NoAcquire noacquire) | |
Constructs a Pipe reference without acquiring the handle. | |
StreamPipe & | operator= (oslPipe Pipe) |
Attaches the oslPipe to this object. | |
StreamPipe & | operator= (const Pipe &pipe) |
Assignment operator. | |
sal_Int32 | recv (void *pBuffer, sal_Int32 BytesToRead) const |
Tries to receives BytesToRead data from the connected pipe,. | |
sal_Int32 | send (const void *pBuffer, sal_Int32 BytesToSend) const |
Tries to sends BytesToSend data from the connected pipe. | |
sal_Int32 | read (void *pBuffer, sal_Int32 n) const |
Retrieves n bytes from the stream and copies them into pBuffer. | |
sal_Int32 | write (const void *pBuffer, sal_Int32 n) const |
Writes n bytes from pBuffer to the stream. |
A pipe to send or receive a stream of data.
osl::StreamPipe::StreamPipe | ( | ) | [inline] |
Creates an unattached pipe.
You must attach the pipe to an oslPipe e.g. by using the operator=(oslPipe), before you can use the stream- functionality of the object.
osl::StreamPipe::StreamPipe | ( | oslPipe | Pipe | ) | [inline] |
Creates pipe as wrapper around the underlying oslPipe.
Pipe |
osl::StreamPipe::StreamPipe | ( | const StreamPipe & | Pipe | ) | [inline] |
Copy constructor.
Pipe |
osl::StreamPipe::StreamPipe | ( | const ::rtl::OUString & | strName, |
oslPipeOptions | Options = osl_Pipe_OPEN |
||
) | [inline] |
Creates a pipe.
strName | |
Options |
osl::StreamPipe::StreamPipe | ( | const ::rtl::OUString & | strName, |
oslPipeOptions | Options, | ||
const Security & | rSec | ||
) | [inline] |
Creates a pipe.
strName | |
Options | |
rSec |
osl::StreamPipe::StreamPipe | ( | oslPipe | pipe, |
__sal_NoAcquire | noacquire | ||
) | [inline] |
Constructs a Pipe reference without acquiring the handle.
StreamPipe& osl::StreamPipe::operator= | ( | oslPipe | Pipe | ) | [inline] |
StreamPipe& osl::StreamPipe::operator= | ( | const Pipe & | pipe | ) | [inline] |
Assignment operator.
Reimplemented from osl::Pipe.
sal_Int32 osl::StreamPipe::read | ( | void * | pBuffer, |
sal_Int32 | n | ||
) | const [inline] |
Retrieves n bytes from the stream and copies them into pBuffer.
The method avoids incomplete reads due to packet boundaries.
pBuffer | receives the read data. |
n | the number of bytes to read. pBuffer must be large enough to hold the n bytes! |
sal_Int32 osl::StreamPipe::recv | ( | void * | pBuffer, |
sal_Int32 | BytesToRead | ||
) | const [inline] |
Tries to receives BytesToRead data from the connected pipe,.
pBuffer | [out] Points to a buffer that will be filled with the received data. |
BytesToRead | [in] The number of bytes to read. pBuffer must have at least this size. |
sal_Int32 osl::StreamPipe::send | ( | const void * | pBuffer, |
sal_Int32 | BytesToSend | ||
) | const [inline] |
Tries to sends BytesToSend data from the connected pipe.
pBuffer | [in] Points to a buffer that contains the send-data. |
BytesToSend | [in] The number of bytes to send. pBuffer must have at least this size. |
sal_Int32 osl::StreamPipe::write | ( | const void * | pBuffer, |
sal_Int32 | n | ||
) | const [inline] |
Writes n bytes from pBuffer to the stream.
The method avoids incomplete writes due to packet boundaries.
pBuffer | contains the data to be written. |
n | the number of bytes to write. |