15 #ifndef CONNECTIONWRITER_H 16 #define CONNECTIONWRITER_H 18 #include "pandabase.h" 19 #include "datagramQueue.h" 20 #include "connection.h" 21 #include "pointerTo.h" 41 const string &thread_name =
string());
44 void set_max_queue_size(
int max_size);
45 int get_max_queue_size()
const;
46 int get_current_queue_size()
const;
48 BLOCKING
bool send(
const Datagram &datagram,
52 BLOCKING
bool send(
const Datagram &datagram,
57 bool is_valid_for_udp(
const Datagram &datagram)
const;
60 bool is_immediate()
const;
61 int get_num_threads()
const;
63 void set_raw_mode(
bool mode);
64 bool get_raw_mode()
const;
66 void set_tcp_header_size(
int tcp_header_size);
67 int get_tcp_header_size()
const;
75 void thread_run(
int thread_index);
87 class WriterThread :
public Thread {
91 virtual void thread_main();
103 friend class WriterThread;
A specific kind of Datagram, especially for sending across or receiving from a network.
The primary interface to the low-level networking layer in this package.
This class handles threaded delivery of datagrams to various TCP or UDP sockets.
A thread; that is, a lightweight process.
Represents a single TCP or UDP socket for input or output.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
A thread-safe, FIFO queue of NetDatagrams.
Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound...