#include <net.H>
Inheritance diagram for NetStream:
Public Types | |
enum | StreamFlags { write = 0x1, read = 0x2, rw = 0x3, ascii = 0x4, ascii_w = 0x5, ascii_r = 0x6, ascii_rw = 0x7 } |
Public Member Functions | |
NetStream (int port, const char *name) | |
NetStream (int fd, struct sockaddr_in *client, bool block=false) | |
NetStream (Cstr_ptr &name, StreamFlags) | |
virtual | ~NetStream () |
str_ptr | name (void) const |
str_ptr | print_name (void) const |
int | port (void) const |
int | processing (void) const |
Network * | network (void) const |
void | subscribe (Cstr_ptr &t) |
void | subscribe (Cstr_list &t) |
bool | attached (void) const |
void | set_port (int p) |
void | add_network (Network *n) |
void | flush_data (void) |
int | read_stuff (void) |
virtual void | sample () |
void | no_tcp_delay () |
void | write (const char *const data, int count) |
void | read (UGAptr data, int count, int pop=1) |
void | flush () |
iostream * | iostr () const |
istream * | istr () const |
ostream * | ostr () const |
int | ascii () const |
char | peekahead () |
void | read_open_delim () |
void | read_close_delim () |
void | write_open_delim () |
void | write_close_delim () |
void | write_newline () |
void | write_delim (char) |
char | read_delim () |
int | check () |
int | eof () const |
void | ws (char *) |
STDbool | operator! () const |
STDbool | fail () const |
STDbool | block () const |
STDbool | block (STDbool flag) |
str_ptr | get_string_with_spaces () |
virtual void | reset () |
virtual void | except () |
int | fd () |
Static Public Member Functions | |
static void | no_linger (int fd) |
Protected Member Functions | |
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) |
virtual size_t | recv (UGAptr, int) |
virtual size_t | send (const UGAptr data, int count) |
void | remove_me () |
Protected Attributes | |
STDmem_queue | _in_queue |
STDmem_queue | _out_queue |
iostream * | _iostream |
istream * | _istream |
ostream * | _ostream |
int | _indent |
int | _fd |
Private Member Functions | |
void | _die (const char *msg) |
Private Attributes | |
str_list | tags_ |
str_ptr | name_ |
int | port_ |
int | msgSize_ |
int | processing_ |
str_ptr | print_name_ |
Network * | network_ |
Friends | |
class | Network |
Definition at line 54 of file net.H.
|
|
|
Definition at line 425 of file net.C. References _die(), FD_EVENT::_fd, STDdstream::block(), NetHost::get_address(), no_linger(), no_tcp_delay(), set_blocking(), and STD_FALSE. Referenced by interpret(). |
|
Definition at line 456 of file net.C. References FD_EVENT::_fd, STDdstream::block(), get_host_print_name(), NetHost::name(), name_, no_linger(), no_tcp_delay(), port_, print_name_, set_blocking(), and STD_FALSE. |
|
Definition at line 490 of file net.C. References FD_EVENT::_fd, STDdstream::_iostream, STDdstream::ascii(), STDdstream::block(), err_adv(), ERR_INCL_ERRNO, ERR_LEV_WARN, err_mesg(), err_msg(), err_ret(), Config::get_var_bool(), int(), read, set_blocking(), STD_FALSE, write, and write(). |
|
Definition at line 600 of file net.C. References FD_EVENT::_fd, STDdstream::_iostream, HANDLE(), port_, and set_blocking(). |
|
Definition at line 663 of file net.C. References FD_EVENT::_fd, Config::get_var_bool(), name_, and port_. Referenced by NetStream(). |
|
Definition at line 83 of file net.H. References network_. Referenced by DISTRIB::load(), and Network::Register(). |
|
Definition at line 43 of file stream.H. References STDdstream::istr(), and STDdstream::ostr(). Referenced by COMMENT::decode(), JOTdone::format(), STDdstream::get_string_with_spaces(), NetStream(), operator<<(), operator>>(), STDdstream::write_close_delim(), STDdstream::write_newline(), STDdstream::write_open_delim(), and STDdstream::ws(). |
|
Definition at line 80 of file net.H. References FD_EVENT::_fd, and STDdstream::iostr(). Referenced by DISTRIB::load_stream(), and DISTRIB::save_stream(). |
|
Definition at line 63 of file stream.H. References STDdstream::_block. |
|
Definition at line 62 of file stream.H. References STDdstream::_block. Referenced by NetStream(), and DISTRIB::save(). |
|
Definition at line 56 of file stream.H. References STDdstream::peekahead(). Referenced by TAGformat::operator int(), and operator>>(). |
|
Definition at line 57 of file stream.H. References STDdstream::_in_queue, STDmem_queue::count(), and STDdstream::istr(). Referenced by DISTRIB::interpret(), TAGformat::operator int(), and STDdstream::peekahead(). |
|
|
|
Definition at line 61 of file stream.H. References STDdstream::_fail. Referenced by STDdstream::peekahead(), and DISTRIB::save(). |
|
Definition at line 48 of file tty.H. References FD_EVENT::_fd. Referenced by Network::connect_to(), interpret(), and WIN_MANAGER::tty_to_id::ready(). |
|
Definition at line 173 of file stream.C. References STDdstream::_block, STDdstream::_fail, STDdstream::_out_queue, STDmem_queue::count(), STDmem_queue::get(), STDmem_queue::peek(), STDdstream::send(), STD_FALSE, and STD_TRUE. Referenced by flush(), flush_data(), and STDdstream::write(). |
|
Definition at line 867 of file net.C. References STDdstream::_out_queue, STDmem_queue::count(), STDdstream::flush(), Config::get_var_bool(), int(), packbuf, packbuf_space, packcount, UGA_PACK_WORD, and write_to_net(). Referenced by Network::flush_data(). |
|
Definition at line 244 of file stream.C. References STDdstream::ascii(), STDdstream::istr(), and j. |
|
Definition at line 801 of file net.C. References Network::_at_barrier, STDdstream::_in_queue, Network::add_stream(), brcase, brdefault, STDmem_queue::count(), FD_EVENT::fd(), Network::first_, Config::get_var_bool(), Network::interpret(), name(), NETadd_connection, NETbarrier, NETbroadcast, NETflush, NETidentify, NETquit, NetStream(), NETtext, network_, ARRAY< T >::num(), port(), print_name(), processing_, mem_push::remove_all(), Network::remove_stream(), set_port(), Network::streams_, and tags_. Referenced by read_stuff(). |
|
Definition at line 39 of file stream.H. References STDdstream::_iostream. Referenced by attached(). |
|
Definition at line 40 of file stream.H. References STDdstream::_iostream, and STDdstream::_istream. Referenced by STDdstream::ascii(), COMMENT::decode(), STDdstream::eof(), STDdstream::get_string_with_spaces(), DISTRIB::load(), operator>>(), STDdstream::peekahead(), STDdstream::read_close_delim(), and STDdstream::read_open_delim(). |
|
Definition at line 72 of file net.H. References name_. Referenced by Network::accept_stream(), interpret(), DISTRIB::load_stream(), IOManager::notify_postload(), IOManager::notify_postsave(), IOManager::notify_preload(), IOManager::notify_presave(), and set_port(). |
|
Definition at line 76 of file net.H. References network_. Referenced by sample(). |
|
Definition at line 784 of file net.C. Referenced by Network::configure(), and NetStream(). |
|
Definition at line 643 of file net.C. References FD_EVENT::_fd, Config::get_var_bool(), and print_name(). Referenced by NetStream(). |
|
Definition at line 60 of file stream.H. References STDdstream::_fail. |
|
Definition at line 41 of file stream.H. References STDdstream::_iostream, and STDdstream::_ostream. Referenced by STDdstream::ascii(), operator<<(), and STDdstream::write_delim(). |
|
Definition at line 65 of file stream.C. References STDdstream::_fail, STDdstream::eof(), STDdstream::fail(), STDdstream::istr(), STDdstream::read(), and STD_FALSE. Referenced by STDdstream::check(), and DISTRIB::interpret(). |
|
Definition at line 74 of file net.H. References port_. Referenced by JOTcreate::get(), interpret(), and set_port(). |
|
Definition at line 73 of file net.H. References print_name_. Referenced by interpret(), DISTRIB::interpret(), and no_tcp_delay(). |
|
Definition at line 75 of file net.H. References processing_. Referenced by Network::processing(). |
|
Definition at line 123 of file stream.C. References STDdstream::_block, STDdstream::_fail, STDdstream::_in_queue, STDmem_queue::count(), DSTREAM_READ_AHEAD_FACTOR, STDmem_queue::get(), STDmem_queue::peek(), STDmem_queue::put(), STDdstream::recv(), STD_FALSE, and STD_TRUE. Referenced by operator>>(), STDdstream::peekahead(), and STDdstream::read_delim(). |
|
Definition at line 205 of file stream.C. References STDdstream::istr(), and STDdstream::read_delim(). Referenced by TAGformat::read_end_id(). |
|
Definition at line 236 of file stream.C. References STDdstream::read(). Referenced by operator>>(), STDdstream::read_close_delim(), and STDdstream::read_open_delim(). |
|
Definition at line 675 of file net.C. References FD_EVENT::_fd, Config::get_var_bool(), port_, read, and the_time(). Referenced by read_stuff(). |
|
Definition at line 216 of file stream.C. References STDdstream::istr(), and STDdstream::read_delim(). Referenced by TAGformat::read_id(). |
|
Definition at line 886 of file net.C. References STDdstream::_in_queue, Config::get_var_bool(), int(), interpret(), msgSize_, packbuf, packbuf_space, STDmem_queue::put(), read_from_net(), and UGA_UNPACK_INTEGER. Referenced by DISTRIB::load(), and sample(). |
|
Reimplemented from STDdstream. |
|
Definition at line 637 of file net.C. References network_, and Network::remove_stream(). |
|
Reimplemented in TabletMultimode. |
|
Implements FD_EVENT. Definition at line 959 of file net.C. References network(), read_stuff(), and Network::remove_stream(). |
|
Reimplemented from STDdstream. Definition at line 101 of file net.H. References write_to_net(). |
|
Definition at line 736 of file net.C. References FD_EVENT::_fd, err_ret(), and Config::get_var_bool(). Referenced by NetStream(), write_to_net(), and ~NetStream(). |
|
Definition at line 417 of file net.C. References get_host_print_name(), name(), port(), port_, and print_name_. Referenced by interpret(). |
|
Definition at line 78 of file net.H. References tags_. |
|
Definition at line 77 of file net.H. References tags_. Referenced by Network::add_stream(), and Network::subscribe(). |
|
Definition at line 98 of file stream.C. References STDdstream::_block, STDdstream::_fail, STDdstream::_out_queue, STDdstream::flush(), STDmem_queue::put(), and STD_FALSE. Referenced by operator<<(), and STDdstream::write_delim(). |
|
Definition at line 50 of file stream.H. References STDdstream::_indent, STDdstream::ascii(), and STDdstream::write_delim(). Referenced by TAGformat::end_id(). |
|
Definition at line 227 of file stream.C. References STDdstream::ostr(), and STDdstream::write(). Referenced by operator<<(), STDdstream::write_close_delim(), and STDdstream::write_open_delim(). |
|
Definition at line 51 of file stream.H. References STDdstream::_indent, STDdstream::ascii(), and STDdstream::ws(). Referenced by DATA_ITEM::format(), and TAGformat::id(). |
|
Definition at line 49 of file stream.H. References STDdstream::_indent, STDdstream::ascii(), and STDdstream::write_delim(). Referenced by TAGformat::id(). |
|
Definition at line 761 of file net.C. References FD_EVENT::_fd, set_blocking(), and write. Referenced by flush_data(), and send(). |
|
Definition at line 729 of file stream.C. References STDdstream::ascii(). Referenced by TAGformat::id(), and STDdstream::write_newline(). |
|
|
|
Definition at line 41 of file tty.H. Referenced by _die(), attached(), TTYfd::clear(), TTYfd::close(), Network::configure(), TTYfd::deactivate(), TTYfd::drain(), FD_EVENT::fd(), TTYfd::get_flags(), NetStream(), no_tcp_delay(), TTYfd::nread(), TTYfd::open(), TTYfd::read_all(), read_from_net(), TTYfd::send_break(), set_blocking(), TTYfd::set_flags(), TTYfd::setup(), Network::wait_for_connect(), TTYfd::write(), write_to_net(), and ~NetStream(). |
|
Definition at line 73 of file stream.H. Referenced by STDdstream::eof(), interpret(), STDdstream::read(), read_stuff(), and STDdstream::send(). |
|
Definition at line 78 of file stream.H. Referenced by STDdstream::write_close_delim(), STDdstream::write_newline(), and STDdstream::write_open_delim(). |
|
Definition at line 75 of file stream.H. Referenced by STDdstream::iostr(), STDdstream::istr(), NetStream(), STDdstream::ostr(), and ~NetStream(). |
|
Definition at line 76 of file stream.H. Referenced by STDdstream::istr(). |
|
Definition at line 77 of file stream.H. Referenced by STDdstream::ostr(). |
|
Definition at line 74 of file stream.H. Referenced by STDdstream::flush(), flush_data(), STDdstream::recv(), and STDdstream::write(). |
|
Definition at line 112 of file net.H. Referenced by read_stuff(). |
|
Definition at line 110 of file net.H. Referenced by _die(), name(), and NetStream(). |
|
Definition at line 115 of file net.H. Referenced by add_network(), interpret(), network(), and remove_me(). |
|
Definition at line 111 of file net.H. Referenced by _die(), NetStream(), port(), read_from_net(), set_port(), and ~NetStream(). |
|
Definition at line 114 of file net.H. Referenced by NetStream(), print_name(), and set_port(). |
|
Definition at line 113 of file net.H. Referenced by interpret(), and processing(). |
|
Definition at line 109 of file net.H. Referenced by interpret(), and subscribe(). |