#include <unix.h>
Public Member Functions | |
unixstream () | |
Construct an unopened "tcpstream" object. | |
unixstream (const char *pathname, int buffer=512) | |
Construct and "open" (connect) the tcp stream to a remote socket. | |
unixstream (UnixSocket &unixsock, int buffer=512) | |
Construct and "accept" (connect) the tcp stream through a server. | |
void | open (const char *pathname, int buffer=512) |
Open a tcp stream connection. | |
void | open (UnixSocket &unixsock, int buffer=512) |
Open a tcp stream connection by accepting a tcp socket. | |
void | close (void) |
Close the active tcp stream connection. | |
bool | operator! () const |
Test to see if stream is open. |
This class behaves a lot more like fstream and similar classes.
ost::unixstream::unixstream | ( | ) |
Construct an unopened "tcpstream" object.
ost::unixstream::unixstream | ( | const char * | pathname, | |
int | buffer = 512 | |||
) |
Construct and "open" (connect) the tcp stream to a remote socket.
pathname | pathname to socket file | |
buffer | size for streaming (optional). |
ost::unixstream::unixstream | ( | UnixSocket & | unixsock, | |
int | buffer = 512 | |||
) |
Construct and "accept" (connect) the tcp stream through a server.
unixsock | socket to accept from. | |
buffer | size for streaming (optional). |
void ost::unixstream::open | ( | const char * | pathname, | |
int | buffer = 512 | |||
) | [inline] |
Open a tcp stream connection.
This will close the currently active connection first.
pathname | pathname to socket file | |
buffer | size for streaming (optional) |
References ost::UnixStream::connect().
void ost::unixstream::open | ( | UnixSocket & | unixsock, | |
int | buffer = 512 | |||
) |
Open a tcp stream connection by accepting a tcp socket.
unixsock | socket to accept from. | |
buffer | size for streaming (optional) |
void ost::unixstream::close | ( | void | ) |
Close the active tcp stream connection.
bool ost::unixstream::operator! | ( | ) | const |