14 #ifndef CCONNECTIONREPOSITORY_H 15 #define CCONNECTIONREPOSITORY_H 36 #ifdef WANT_NATIVE_NET 59 bool threaded_net =
false);
73 INLINE
DCFile &get_dc_file();
75 INLINE
bool has_owner_view()
const;
77 INLINE
void set_handle_c_updates(
bool handle_c_updates);
78 INLINE
bool get_handle_c_updates()
const;
80 INLINE
void set_client_datagram(
bool client_datagram);
81 INLINE
bool get_client_datagram()
const;
83 INLINE
void set_handle_datagrams_internally(
bool handle_datagrams_internally);
84 INLINE
bool get_handle_datagrams_internally()
const;
86 void set_tcp_header_size(
int tcp_header_size);
87 INLINE
int get_tcp_header_size()
const;
90 INLINE
void set_python_repository(PyObject *python_repository);
94 BLOCKING
void set_connection_http(HTTPChannel *channel);
95 BLOCKING SocketStream *get_stream();
98 BLOCKING
bool try_connect_net(
const URLSpec &url);
105 #ifdef WANT_NATIVE_NET 106 BLOCKING
bool connect_native(
const URLSpec &url);
110 #ifdef SIMULATE_NETWORK_DELAY 111 BLOCKING
void start_delay(
double min_delay,
double max_delay);
112 BLOCKING
void stop_delay();
115 BLOCKING
bool check_datagram();
117 BLOCKING INLINE
void get_datagram(
Datagram &dg);
119 BLOCKING INLINE CHANNEL_TYPE get_msg_channel(
int offset = 0)
const;
120 BLOCKING INLINE
int get_msg_channel_count()
const;
121 BLOCKING INLINE CHANNEL_TYPE get_msg_sender()
const;
123 BLOCKING INLINE
unsigned int get_msg_type()
const;
125 INLINE
static const std::string &get_overflow_event_name();
129 BLOCKING
bool send_datagram(
const Datagram &dg);
131 BLOCKING INLINE
void set_want_message_bundling(
bool flag);
132 BLOCKING INLINE
bool get_want_message_bundling()
const;
134 BLOCKING INLINE
void set_in_quiet_zone(
bool flag);
135 BLOCKING INLINE
bool get_in_quiet_zone()
const;
137 BLOCKING
void start_message_bundle();
138 BLOCKING INLINE
bool is_bundling_messages()
const;
139 BLOCKING
void send_message_bundle(
unsigned int channel,
unsigned int sender_channel);
140 BLOCKING
void abandon_message_bundles();
141 BLOCKING
void bundle_msg(
const Datagram &dg);
143 BLOCKING
bool consider_flush();
144 BLOCKING
bool flush();
146 BLOCKING
void disconnect();
147 BLOCKING
void shutdown();
149 INLINE
void set_simulated_disconnect(
bool simulated_disconnect);
150 INLINE
bool get_simulated_disconnect()
const;
152 INLINE
void toggle_verbose();
153 INLINE
void set_verbose(
bool verbose);
154 INLINE
bool get_verbose()
const;
156 INLINE
void set_time_warning(
float time_warning);
157 INLINE
float get_time_warning()
const;
160 bool do_check_datagram();
161 bool handle_update_field();
162 bool handle_update_field_owner();
164 void describe_message(std::ostream &out,
const std::string &prefix,
171 PyObject *_python_repository;
175 SocketStream *_http_conn;
185 #ifdef WANT_NATIVE_NET 191 bool _has_owner_view;
192 bool _handle_c_updates;
193 bool _client_datagram;
194 bool _handle_datagrams_internally;
195 int _tcp_header_size;
196 bool _simulated_disconnect;
204 std::vector<CHANNEL_TYPE> _msg_channels;
205 CHANNEL_TYPE _msg_sender;
206 unsigned int _msg_type;
208 static const std::string _overflow_event_name;
210 bool _want_message_bundling;
211 unsigned int _bundling_msgs;
212 typedef std::vector< std::string > BundledMsgVector;
213 BundledMsgVector _bundle_msgs;
220 #endif // CCONNECTIONREPOSITORY_H PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A container for a URL, e.g.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This flavor of ConnectionManager will queue up all of the reset-connection messages from the Connecti...
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.
Represents the complete list of Distributed Class descriptions as read from a .dc file.
A lightweight class that represents a single element that may be timed and/or counted via stats.
bool is_connected(MObject &node, const string &attribute_name)
Returns true if the named connection exists on the node and is connected to anything,...
This class handles threaded delivery of datagrams to various TCP or UDP sockets.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This flavor of ConnectionReader will read from its sockets and queue up all of the datagrams read for...
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
This class implements the C++ side of the ConnectionRepository object.
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.