Streamable tcp connection between client and server. More...
#include <stream.h>
Public Types | |
enum | access_t { RDONLY, WRONLY, RDWR } |
Public Member Functions | |
void | close (void) |
Close an active stream connection. | |
void | create (char *filename, fsys::access_t access, unsigned mode, size_t buffering=512) |
Create a stream connection to a tcp service. | |
int | err (void) |
Get error flag from last i/o operation. | |
filestream (filestream ©) | |
Create duplicate stream. | |
filestream (char *path, fsys::access_t access, size_t bufsize) | |
Open file stream. | |
filestream () | |
Create an unopened pipe stream. | |
filestream (char *path, fsys::access_t access, unsigned mode, size_t bufsize) | |
Create file stream. | |
void | open (char *filename, fsys::access_t access, size_t buffering=512) |
Open a stream connection to a tcp service. | |
operator bool () | |
See if stream connection is active. | |
bool | operator! () |
See if stream is disconnected. | |
void | seek (fsys::offset_t offset) |
Seek position. | |
virtual | ~filestream () |
Destroy a file stream. | |
Protected Member Functions | |
int | _getch (void) |
This streambuf method is used to load the input buffer through the established pipe connection. | |
int | _putch (int ch) |
This streambuf method is used to write the output buffer through the established pipe connection. | |
Protected Attributes | |
fsys::access_t | ac |
fsys_t | fd |
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.
Definition at line 331 of file stream.h.
int ucc::filestream::_getch | ( | void | ) | [protected, virtual] |
This streambuf method is used to load the input buffer through the established pipe connection.
Implements ucc::CharacterProtocol.
int ucc::filestream::_putch | ( | int | ch | ) | [protected, virtual] |
This streambuf method is used to write the output buffer through the established pipe connection.
ch | char to push through. |
Implements ucc::CharacterProtocol.
int ucc::filestream::err | ( | void | ) | [inline] |
ucc::filestream::operator bool | ( | ) | [inline] |
See if stream connection is active.
Reimplemented from ucc::StreamProtocol.
bool ucc::filestream::operator! | ( | ) | [inline] |
See if stream is disconnected.
Reimplemented from ucc::StreamProtocol.