class tcpstream

C++ "fstream" style tcpstream class. More...

Full nameost::tcpstream
Definition#include <socket.h>
Inheritsost::TCPStream [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

A more natural C++ "tcpstream" class for use by non-threaded applications. This class behaves a lot more like fstream and similar classes.

 tcpstream ()

tcpstream

Construct an unopened "tcpstream" object.

 tcpstream (const char *addr, int buffer = 512)

tcpstream

Construct and "open" (connect) the tcp stream to a remote socket.

Parameters:
addrstring address in form addr:port.
buffersize for streaming (optional).

 tcpstream (TCPSocket &tcp, int buffer = 512)

tcpstream

Construct and "accept" (connect) the tcp stream through a server.

Parameters:
tcpsocket to accept from.
buffersize for streaming (optional).

void  open (const char *addr, int buffer = 512)

open

Open a tcp stream connection. This will close the currently active connection first.

Parameters:
addrstring address in form addr:port.
buffersize for streaming (optional)

void  open (TCPSocket &tcp, int buffer = 512)

open

Open a tcp stream connection by accepting a tcp socket.

Parameters:
tcpsocket to accept from.
buffersize for streaming (optional)

void  close (void)

close

Close the active tcp stream connection.

bool  operator! ()

operator!

[const]

Test to see if stream is open.

Reimplemented from Socket.