Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

ost::unixstream Class Reference

A more natural C++ "unixstream" class for use by non-threaded applications. C++ "fstream" style unixstream class. More...

#include <unix.h>

Inheritance diagram for ost::unixstream::

ost::UnixStream ost::Socket std::streambuf std::iostream List of all members.

Public Methods

 unixstream ()
 Construct an unopened "tcpstream" object. More...

 unixstream (const char *pathname, int buffer=512)
 Construct and "open" (connect) the tcp stream to a remote socket. More...

 unixstream (UnixSocket &unixsock, int buffer=512)
 Construct and "accept" (connect) the tcp stream through a server. More...

void open (const char *pathname, int buffer=512)
 Open a tcp stream connection. More...

void open (UnixSocket &unixsock, int buffer=512)
 Open a tcp stream connection by accepting a tcp socket. More...

void close (void)
 Close the active tcp stream connection. More...

bool operator! () const
 Test to see if stream is open. More...


Detailed Description

A more natural C++ "unixstream" class for use by non-threaded applications. C++ "fstream" style unixstream class.

This class behaves a lot more like fstream and similar classes.

Author:
Alex Pavloff <alex@pavloff.net>


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
unixsock   socket to accept from.
buffer   size for streaming (optional).


Member Function Documentation

void ost::unixstream::close ( void )
 

Close the active tcp stream connection.

void ost::unixstream::open ( UnixSocket & unixsock,
int buffer = 512 )
 

Open a tcp stream connection by accepting a tcp socket.

Parameters:
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.

Parameters:
pathname   pathname to socket file
buffer   size for streaming (optional)

bool ost::unixstream::operator! ( void ) const
 

Test to see if stream is open.

Reimplemented from ost::Socket.


The documentation for this class was generated from the following file:
Generated at Sat May 12 18:59:49 2007 for GNU CommonC++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001