29class EXPCL_PANDA_NET
Connection :
public ReferenceCount {
45 BLOCKING
bool flush();
59 bool send_datagram(
const NetDatagram &datagram,
int tcp_header_size);
60 bool send_raw_datagram(
const NetDatagram &datagram);
62 bool check_send_error(
bool okflag);
69 double _collect_tcp_interval;
70 double _queued_data_start;
71 std::string _queued_data;
74 friend class ConnectionWriter;
The primary interface to the low-level networking layer in this package.
void set_collect_tcp(bool collect_tcp)
Enables or disables "collect-tcp" mode.
void set_recv_buffer_size(int size)
Sets the size of the receive buffer, in bytes.
void set_collect_tcp_interval(double interval)
Specifies the interval in time, in seconds, for which to hold TCP packets before sending all of the r...
bool consider_flush()
Sends the most recently queued TCP datagram(s) if enough time has elapsed.
bool flush()
Sends the most recently queued TCP datagram(s) now.
void set_keep_alive(bool flag)
Sets whether the connection is periodically tested to see if it is still alive.
NetAddress get_address() const
Returns the address bound to this connection, if it is a TCP connection.
void set_ip_time_to_live(int ttl)
Sets IP time-to-live.
double get_collect_tcp_interval() const
Returns the interval in time, in seconds, for which to hold TCP packets before sending all of the rec...
void set_reuse_addr(bool flag)
Sets whether local address reuse is allowed.
ConnectionManager * get_manager() const
Returns a pointer to the ConnectionManager object that serves this connection.
void set_linger(bool flag, double time)
Sets whether nonblocking I/O should be in effect.
bool get_collect_tcp() const
Returns the current setting of "collect-tcp" mode.
void set_ip_type_of_service(int tos)
Sets IP type-of-service and precedence.
void set_no_delay(bool flag)
If flag is true, this disables the Nagle algorithm, and prevents delaying of send to coalesce packets...
void set_send_buffer_size(int size)
Sets the size of the send buffer, in bytes.
Connection(ConnectionManager *manager, Socket_IP *socket)
Creates a connection.
void set_max_segment(int size)
Sets the maximum segment size.
Socket_IP * get_socket() const
Returns the internal Socket_IP that defines the connection.
A lightweight reentrant mutex.
Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound.
A specific kind of Datagram, especially for sending across or receiving from a network.
Base functionality for a INET domain Socket This call should be the starting point for all other unix...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.