class tcpstream

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

Definition#include <socket.h>
InheritsTCPStream
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


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 ()

Construct an unopened "tcpstream" object.

tcpstream (char *addr, int buffer = 512)

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)

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

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

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

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 a tcp stream connection by accepting a tcp socket.

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

void close (void)

Close the active tcp stream connection.

inline bool operator! ()

Test to see if stream is open.

Reimplemented from Socket