OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_NamedPipe.h>
Public Member Functions | |
NamedPipe () | |
~NamedPipe () | |
bool | openExisting (const String &pipeName) |
bool | createNewPipe (const String &pipeName, bool mustNotExist=false) |
void | close () |
bool | isOpen () const |
String | getName () const |
int | read (void *destBuffer, int maxBytesToRead, int timeOutMilliseconds) |
int | write (const void *sourceBuffer, int numBytesToWrite, int timeOutMilliseconds) |
A cross-process pipe that can have data written to and read from it.
Two processes can use NamedPipe objects to exchange blocks of data.
Definition at line 36 of file juce_NamedPipe.h.
juce::NamedPipe::NamedPipe | ( | ) |
Creates a NamedPipe.
Definition at line 26 of file juce_NamedPipe.cpp.
juce::NamedPipe::~NamedPipe | ( | ) |
Destructor.
Definition at line 28 of file juce_NamedPipe.cpp.
void juce::NamedPipe::close | ( | ) |
Closes the pipe, if it's open.
Referenced by createNewPipe(), openExisting(), and ~NamedPipe().
Tries to create a new pipe. Returns true if it succeeds. If mustNotExist is true then it will fail if a pipe is already open with the same name.
Definition at line 47 of file juce_NamedPipe.cpp.
String juce::NamedPipe::getName | ( | ) | const |
Returns the last name that was used to try to open this pipe.
Definition at line 56 of file juce_NamedPipe.cpp.
bool juce::NamedPipe::isOpen | ( | ) | const |
True if the pipe is currently open.
Definition at line 42 of file juce_NamedPipe.cpp.
Tries to open a pipe that already exists. Returns true if it succeeds.
Definition at line 33 of file juce_NamedPipe.cpp.
Reads data from the pipe.
This will block until another thread has written enough data into the pipe to fill the number of bytes specified, or until another thread calls the cancelPendingReads() method.
If the operation fails, it returns -1, otherwise, it will return the number of bytes read.
If timeOutMilliseconds is less than zero, it will wait indefinitely, otherwise this is a maximum timeout for reading from the pipe.
int juce::NamedPipe::write | ( | const void * | sourceBuffer, |
int | numBytesToWrite, | ||
int | timeOutMilliseconds | ||
) |
Writes some data to the pipe.