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

Connection Class Reference

#include <connection.h>

Inheritance diagram for Connection:

ReferenceCount List of all members.

Private Member Functions

 ~Connection ()
NetAddress get_address () const
ConnectionManagerget_manager () const
PRFileDesc * get_socket () const
void set_collect_tcp (bool collect_tcp)
bool get_collect_tcp () const
void set_collect_tcp_interval (double interval)
double get_collect_tcp_interval () const
bool consider_flush ()
bool flush ()
void set_nonblock (bool flag)
void set_linger (bool flag, double time)
void set_reuse_addr (bool flag)
void set_keep_alive (bool flag)
void set_recv_buffer_size (int size)
void set_send_buffer_size (int size)
void set_ip_time_to_live (int ttl)
void set_ip_type_of_service (int tos)
void set_no_delay (bool flag)
void set_max_segment (int size)
bool send_datagram (const NetDatagram &datagram)
bool send_raw_datagram (const NetDatagram &datagram)
bool do_flush ()
bool check_send_error (PRInt32 result, PRErrorCode errcode, PRInt32 bytes_to_send)

Private Attributes

PUBLISHED __pad0__: Connection(ConnectionManager *manager
PUBLISHED PRFileDesc * socket
ConnectionManager_manager
PRFileDesc * _socket
PRLock * _write_mutex
bool _collect_tcp
double _collect_tcp_interval
double _queued_data_start
string _queued_data
int _queued_count

Friends

class ConnectionWriter

Constructor & Destructor Documentation

Connection::~Connection  )  [private]
 

Definition at line 56 of file connection.cxx.

References _socket, _write_mutex, flush(), NULL, and pprerror().


Member Function Documentation

bool Connection::check_send_error PRInt32  result,
PRErrorCode  errcode,
PRInt32  bytes_to_send
[private]
 

Definition at line 504 of file connection.cxx.

References _manager, ConnectionManager::connection_reset(), NULL, and pprerror().

Referenced by do_flush(), send_datagram(), and send_raw_datagram().

bool Connection::consider_flush  )  [private]
 

Definition at line 183 of file connection.cxx.

References _collect_tcp, _collect_tcp_interval, _queued_data_start, _write_mutex, do_flush(), ClockObject::get_global_clock(), and ClockObject::get_real_time().

bool Connection::do_flush  )  [private]
 

Definition at line 466 of file connection.cxx.

References _queued_count, _queued_data, _queued_data_start, _socket, _write_mutex, check_send_error(), ClockObject::get_global_clock(), and ClockObject::get_real_time().

Referenced by consider_flush(), flush(), send_datagram(), and send_raw_datagram().

bool Connection::flush  )  [private]
 

Definition at line 203 of file connection.cxx.

References _write_mutex, and do_flush().

Referenced by ~Connection().

NetAddress Connection::get_address  )  const [private]
 

Definition at line 79 of file connection.cxx.

References _socket, and pprerror().

bool Connection::get_collect_tcp  )  const [private]
 

Definition at line 143 of file connection.cxx.

References _collect_tcp.

double Connection::get_collect_tcp_interval  )  const [private]
 

Definition at line 171 of file connection.cxx.

References _collect_tcp_interval.

ConnectionManager * Connection::get_manager  )  const [private]
 

Definition at line 95 of file connection.cxx.

References _manager.

PRFileDesc * Connection::get_socket  )  const [private]
 

Definition at line 106 of file connection.cxx.

References _socket.

Referenced by ConnectionManager::close_connection(), and ConnectionWriter::send().

bool Connection::send_datagram const NetDatagram datagram  )  [private]
 

Definition at line 358 of file connection.cxx.

References _collect_tcp, _collect_tcp_interval, _queued_count, _queued_data, _queued_data_start, _socket, _write_mutex, check_send_error(), data, do_flush(), NetAddress::get_addr(), NetDatagram::get_address(), ClockObject::get_global_clock(), DatagramTCPHeader::get_header(), DatagramUDPHeader::get_header(), ClockObject::get_real_time(), NULL, DatagramTCPHeader::verify_datagram(), and DatagramUDPHeader::verify_datagram().

Referenced by ConnectionWriter::send().

bool Connection::send_raw_datagram const NetDatagram datagram  )  [private]
 

Definition at line 415 of file connection.cxx.

References _collect_tcp, _collect_tcp_interval, _queued_count, _queued_data, _queued_data_start, _socket, _write_mutex, check_send_error(), data, do_flush(), NetAddress::get_addr(), NetDatagram::get_address(), ClockObject::get_global_clock(), ClockObject::get_real_time(), and NULL.

Referenced by ConnectionWriter::send().

void Connection::set_collect_tcp bool  collect_tcp  )  [private]
 

Definition at line 132 of file connection.cxx.

References _collect_tcp, and collect_tcp.

void Connection::set_collect_tcp_interval double  interval  )  [private]
 

Definition at line 157 of file connection.cxx.

References _collect_tcp_interval.

void Connection::set_ip_time_to_live int  ttl  )  [private]
 

Definition at line 301 of file connection.cxx.

References _socket, and data.

void Connection::set_ip_type_of_service int  tos  )  [private]
 

Definition at line 314 of file connection.cxx.

References _socket, and data.

void Connection::set_keep_alive bool  flag  )  [private]
 

Definition at line 262 of file connection.cxx.

References _socket, and data.

void Connection::set_linger bool  flag,
double  time
[private]
 

Definition at line 234 of file connection.cxx.

References _socket, and data.

void Connection::set_max_segment int  size  )  [private]
 

Definition at line 341 of file connection.cxx.

References _socket, and data.

void Connection::set_no_delay bool  flag  )  [private]
 

Definition at line 328 of file connection.cxx.

References _socket, and data.

void Connection::set_nonblock bool  flag  )  [private]
 

Definition at line 214 of file connection.cxx.

References _socket, and data.

void Connection::set_recv_buffer_size int  size  )  [private]
 

Definition at line 275 of file connection.cxx.

References _socket, and data.

void Connection::set_reuse_addr bool  flag  )  [private]
 

Definition at line 248 of file connection.cxx.

References _socket, and data.

void Connection::set_send_buffer_size int  size  )  [private]
 

Definition at line 288 of file connection.cxx.

References _socket, and data.


Friends And Related Function Documentation

friend class ConnectionWriter [friend]
 

Definition at line 84 of file connection.h.


Member Data Documentation

PUBLISHED Connection::__pad0__ [private]
 

Reimplemented from ReferenceCount.

Definition at line 40 of file connection.h.

bool Connection::_collect_tcp [private]
 

Definition at line 78 of file connection.h.

Referenced by consider_flush(), get_collect_tcp(), send_datagram(), send_raw_datagram(), and set_collect_tcp().

double Connection::_collect_tcp_interval [private]
 

Definition at line 79 of file connection.h.

Referenced by consider_flush(), get_collect_tcp_interval(), send_datagram(), send_raw_datagram(), and set_collect_tcp_interval().

ConnectionManager* Connection::_manager [private]
 

Definition at line 74 of file connection.h.

Referenced by check_send_error(), and get_manager().

int Connection::_queued_count [private]
 

Definition at line 82 of file connection.h.

Referenced by do_flush(), send_datagram(), and send_raw_datagram().

string Connection::_queued_data [private]
 

Definition at line 81 of file connection.h.

Referenced by do_flush(), send_datagram(), and send_raw_datagram().

double Connection::_queued_data_start [private]
 

Definition at line 80 of file connection.h.

Referenced by consider_flush(), do_flush(), send_datagram(), and send_raw_datagram().

PRFileDesc* Connection::_socket [private]
 

Definition at line 75 of file connection.h.

Referenced by do_flush(), get_address(), get_socket(), send_datagram(), send_raw_datagram(), set_ip_time_to_live(), set_ip_type_of_service(), set_keep_alive(), set_linger(), set_max_segment(), set_no_delay(), set_nonblock(), set_recv_buffer_size(), set_reuse_addr(), set_send_buffer_size(), and ~Connection().

PRLock* Connection::_write_mutex [private]
 

Definition at line 76 of file connection.h.

Referenced by consider_flush(), do_flush(), flush(), send_datagram(), send_raw_datagram(), and ~Connection().

PUBLISHED PRFileDesc* Connection::socket [private]
 

Definition at line 40 of file connection.h.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:11:42 2003 for Panda by doxygen1.3