Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

NetStream Class Reference

USAGE: NetStream mycli("in.cs.brown.edu", 21);. More...

#include <net_stream.H>

Inherits FD_EVENT.

Inherited by ASCIIstream, ASCIIstream, and DEVice_Vicon.

List of all members.

Public Types

enum  StreamFlags {
  write = 0x1, read = 0x2, rw = 0x3, ascii = 0x4,
  ascii_w = 0x5, ascii_r = 0x6, ascii_rw = 0x7
}

Public Methods

 NetStream (int port, const char *name)
 NetStream (int fd, struct sockaddr_in *client, bool block=false)
NetStream & operator= (const NetStream &)
virtual ~NetStream ()
str_ptr name (void) const
str_ptr print_name (void) const
int port (void) const
int processing (void) const
Networknetwork (void) const
void subscribe (Cstr_ptr &t)
void subscribe (Cstr_list &t)
void set_port (int p)
void add_network (Network *n)
virtual void flush_data (void)
int read_stuff (void)
virtual void sample ()
void no_tcp_delay ()
void flush ()
ostream * ostr ()
istream * istr ()

Static Public Methods

void no_linger (int fd)
NetStream * ostream_to_NetStream (ostream *os)

Protected Methods

void set_blocking (bool val) const
ssize_t write_to_net (const void *buf, size_t nbyte) const
ssize_t read_from_net (void *buf, size_t nbyte) const
int interpret (void)
void remove_me ()
void init_streams (bool readable, bool writeable)

Protected Attributes

ostrstream * _ostr
istream * _istr
STDmem_queue _in_queue
ARRAY< char > _charbuf

Friends

class Network


Detailed Description

USAGE: NetStream mycli("in.cs.brown.edu", 21);.


Member Enumeration Documentation

enum NetStream::StreamFlags
 

Enumeration values:
write 
read 
rw 
ascii 
ascii_w 
ascii_r 
ascii_rw 


Constructor & Destructor Documentation

NetStream::NetStream int    port,
const char *    name
 

NetStream::NetStream int    fd,
struct sockaddr_in *    client,
bool    block = false
 

NetStream::~NetStream   [virtual]
 


Member Function Documentation

void NetStream::add_network Network   n [inline]
 

void NetStream::flush  
 

void NetStream::flush_data void    [virtual]
 

Reimplemented in ASCIIstream, and ASCIIstream.

void NetStream::init_streams bool    readable,
bool    writeable
[protected]
 

int NetStream::interpret void    [protected]
 

istream* NetStream::istr   [inline]
 

str_ptr NetStream::name void    const [inline]
 

Network* NetStream::network void    const [inline]
 

void NetStream::no_linger int    fd [static]
 

void NetStream::no_tcp_delay  
 

NetStream & NetStream::operator= const NetStream &   
 

ostream* NetStream::ostr   [inline]
 

NetStream* NetStream::ostream_to_NetStream ostream *    os [inline, static]
 

int NetStream::port void    const [inline]
 

str_ptr NetStream::print_name void    const [inline]
 

int NetStream::processing void    const [inline]
 

ssize_t NetStream::read_from_net void *    buf,
size_t    nbyte
const [protected]
 

int NetStream::read_stuff void   
 

void NetStream::remove_me   [protected]
 

void NetStream::sample   [virtual]
 

Implements FD_EVENT.

Reimplemented in ASCIIstream, and DEVice_Vicon.

void NetStream::set_blocking bool    val const [protected]
 

void NetStream::set_port int    p
 

void NetStream::subscribe Cstr_list &    t [inline]
 

void NetStream::subscribe Cstr_ptr &    t [inline]
 

ssize_t NetStream::write_to_net const void *    buf,
size_t    nbyte
const [protected]
 


Friends And Related Function Documentation

friend class Network [friend]
 


Member Data Documentation

ARRAY<char> NetStream::_charbuf [protected]
 

STDmem_queue NetStream::_in_queue [protected]
 

istream* NetStream::_istr [protected]
 

ostrstream* NetStream::_ostr [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 15 16:26:00 2003 for gluebase by doxygen1.2.18