# TMCNetStream Class Reference
[MCCore]

Inheritance diagram for TMCNetStream:

List of all members.

## Public Member Functions
| TMCNetStream (IMCSocket *socket)
| ~TMCNetStream ()
virtual int32 | tell ()
virtual void | seek (int32 off, seek_dir dir=beg)
virtual void | putback (int8 c)
| can only be used on (some) input streams
virtual void | read (int8 *s, int32 n)
virtual void | write (const int8 *s, int32 n)
virtual void | get (int8 &c)
void | AttachToSocket (IMCSocket *socket)
void | Flush ()
void | Close ()
boolean | MoreDataAvailable ()
## Protected Attributes
TMCCountedPtr< IMCSocket > | fSocket
TMCArray< int8 > | fBuffer
int32 | fBufferCount
| number of characters read in the buffer
int32 | fCurrentPosition
| position in the buffer
TMCArray< int8 > | fWriteBuffer
## Private Types
enum | { kBufferSize = 256 }

## Detailed Description

TMCNetStream allows reading and writting data on a socket (TMCSocket)

## Member Enumeration Documentation

anonymous enum`[private]`

Enumerator:

  kBufferSize |

## Constructor & Destructor Documentation

TMCNetStream::TMCNetStream | ( | IMCSocket * | socket | ) |

TMCNetStream::~TMCNetStream | ( |  | ) |

## Member Function Documentation

void TMCNetStream::AttachToSocket | ( | IMCSocket * | socket | ) |

void TMCNetStream::Close | ( |  | ) |

void TMCNetStream::Flush | ( |  | ) |

virtual void TMCNetStream::get | ( | int8 & | c | ) | `[virtual]`

Reimplemented from TMCiostream.

boolean TMCNetStream::MoreDataAvailable | ( |  | ) |

virtual void TMCNetStream::putback | ( | int8 | c | ) | `[virtual]`

can only be used on (some) input streams

Implements TMCiostream.

virtual void TMCNetStream::read | ( | int8 * | s,
|  | int32 | n |
| ) |  |  | `[virtual]`

Implements TMCiostream.

virtual void TMCNetStream::seek | ( | int32 | off,
|  | seek_dir | dir = `beg` |
| ) |  |  | `[virtual]`

Implements TMCiostream.

virtual int32 TMCNetStream::tell | ( |  | ) | `[virtual]`

Implements TMCiostream.

virtual void TMCNetStream::write | ( | const int8 * | s,
|  | int32 | n |
| ) |  |  | `[virtual]`

Implements TMCiostream.

## Member Data Documentation

TMCArray<int8> TMCNetStream::fBuffer`[protected]`

int32 TMCNetStream::fBufferCount`[protected]`

number of characters read in the buffer

int32 TMCNetStream::fCurrentPosition`[protected]`

position in the buffer

TMCCountedPtr<IMCSocket> TMCNetStream::fSocket`[protected]`

TMCArray<int8> TMCNetStream::fWriteBuffer`[protected]`

The documentation for this class was generated from the following file:

- MCNetStream.h