14 #ifndef CONNECTIONREADER_H
15 #define CONNECTIONREADER_H
26 #include "socket_fdset.h"
64 const std::string &thread_name = std::string());
68 bool remove_connection(
Connection *connection);
74 INLINE
bool is_polling()
const;
75 int get_num_threads()
const;
77 void set_raw_mode(
bool mode);
78 bool get_raw_mode()
const;
80 void set_tcp_header_size(
int tcp_header_size);
81 int get_tcp_header_size()
const;
86 virtual void flush_read_connection(
Connection *connection);
87 virtual void receive_datagram(
const NetDatagram &datagram)=0;
101 void clear_manager();
102 void finish_socket(SocketInfo *sinfo);
104 virtual bool process_incoming_data(SocketInfo *sinfo);
105 virtual bool process_incoming_udp_data(SocketInfo *sinfo);
106 virtual bool process_incoming_tcp_data(SocketInfo *sinfo);
107 virtual bool process_raw_incoming_udp_data(SocketInfo *sinfo);
108 virtual bool process_raw_incoming_tcp_data(SocketInfo *sinfo);
123 void thread_run(
int thread_index);
125 SocketInfo *get_next_available_socket(
bool allow_block,
126 int current_thread_index);
128 void rebuild_select_list();
133 int _tcp_header_size;
136 class ReaderThread :
public Thread {
140 virtual void thread_main();
163 AtomicAdjust::Integer _currently_polling_thread;
166 friend class ReaderThread;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The primary interface to the low-level networking layer in this package.
This is an abstract base class for a family of classes that listen for activity on a socket and respo...
Represents a single TCP or UDP socket for input or output.
This is a standard, non-reentrant mutex, similar to the Mutex class.
A standard mutex, or mutual exclusion lock.
A specific kind of Datagram, especially for sending across or receiving from a network.
A simple place to store and manipulate tcp and port address for communication layer.
Base functionality for a INET domain Socket This call should be the starting point for all other unix...
A thread; that is, a lightweight process.
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.
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.