Streamable tcp connection between client and server.
More...
#include <stream.h>
|
enum | access_t { RDONLY,
WRONLY,
RDWR
} |
|
|
void | cancel (void) |
|
int | close (void) |
| Close an active stream connection. More...
|
|
void | open (const char *path, access_t access, char **args, char **env=((void *) 0), size_t buffering=512) |
| Open a stream connection to a pipe service. More...
|
|
| operator bool () const |
| See if stream connection is active. More...
|
|
bool | operator! () const |
| See if stream is disconnected. More...
|
|
| pipestream () |
| Create an unopened pipe stream.
|
|
| pipestream (const char *command, access_t access, char **args, char **env=((void *) 0), size_t size=512) |
| Create child process and start pipe. More...
|
|
void | terminate (void) |
| Force terminate child and close.
|
|
virtual | ~pipestream () |
| Destroy a pipe stream.
|
|
bool | is_open (void) const |
|
| operator bool () const |
|
bool | operator! () const |
|
int | sync (void) |
| Flush the stream input and output buffers, writes pending output. More...
|
|
|
int | overflow (int ch) |
| This streambuf method is used to write the output buffer through the established pipe connection. More...
|
|
void | release (void) |
| Release the stream, detach/do not wait for the process.
|
|
int | underflow (void) |
| This streambuf method is used to load the input buffer through the established pipe connection. More...
|
|
void | allocate (size_t size) |
|
void | release (void) |
|
int | uflow () |
| This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode. More...
|
|
Streamable tcp connection between client and server.
The tcp stream class can represent a client connection to a server or an instance of a service generated by a tcp listener. As a stream class, data can be manipulated using the << and >> operators.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 234 of file stream.h.
ucommon::pipestream::pipestream |
( |
const char * |
command, |
|
|
access_t |
access, |
|
|
char ** |
args, |
|
|
char ** |
env = ((void *) 0) , |
|
|
size_t |
size = 512 |
|
) |
| |
Create child process and start pipe.
- Parameters
-
path | to execute. |
access | mode of pipe stream. |
args | to pass to command. |
env | to create in child. |
size | of buffer. |
int ucommon::pipestream::close |
( |
void |
| ) |
|
Close an active stream connection.
This waits for the child to terminate.
void ucommon::pipestream::open |
( |
const char * |
path, |
|
|
access_t |
access, |
|
|
char ** |
args, |
|
|
char ** |
env = ((void *) 0) , |
|
|
size_t |
buffering = 512 |
|
) |
| |
Open a stream connection to a pipe service.
- Parameters
-
path | to execute. |
access | mode of stream. |
args | to pass to command. |
env | to create in child process. |
buffering | size to use. |
ucommon::pipestream::operator bool |
( |
| ) |
const |
|
inline |
See if stream connection is active.
- Returns
- true if stream is active.
Definition at line 299 of file stream.h.
bool ucommon::pipestream::operator! |
( |
| ) |
const |
|
inline |
See if stream is disconnected.
- Returns
- true if stream disconnected.
Definition at line 306 of file stream.h.
int ucommon::pipestream::overflow |
( |
int |
ch | ) |
|
|
protected |
This streambuf method is used to write the output buffer through the established pipe connection.
- Parameters
-
- Returns
- char pushed through.
int ucommon::pipestream::underflow |
( |
void |
| ) |
|
|
protected |
This streambuf method is used to load the input buffer through the established pipe connection.
- Returns
- char from get buffer, EOF if not connected.
The documentation for this class was generated from the following file: