15 #ifndef CCONNECTIONREPOSITORY_H 16 #define CCONNECTIONREPOSITORY_H 18 #include "directbase.h" 19 #include "pointerTo.h" 24 #include "pStatCollector.h" 25 #include "datagramIterator.h" 26 #include "clockObject.h" 28 #include "reMutexHolder.h" 31 #include "queuedConnectionManager.h" 32 #include "connectionWriter.h" 33 #include "queuedConnectionReader.h" 34 #include "connection.h" 37 #ifdef WANT_NATIVE_NET 38 #include "buffered_datagramconnection.h" 39 #include "socket_address.h" 64 bool threaded_net =
false);
77 INLINE
DCFile &get_dc_file();
79 INLINE
bool has_owner_view()
const;
81 INLINE
void set_handle_c_updates(
bool handle_c_updates);
82 INLINE
bool get_handle_c_updates()
const;
84 INLINE
void set_client_datagram(
bool client_datagram);
85 INLINE
bool get_client_datagram()
const;
87 INLINE
void set_handle_datagrams_internally(
bool handle_datagrams_internally);
88 INLINE
bool get_handle_datagrams_internally()
const;
90 void set_tcp_header_size(
int tcp_header_size);
91 INLINE
int get_tcp_header_size()
const;
94 INLINE
void set_python_repository(PyObject *python_repository);
98 BLOCKING
void set_connection_http(HTTPChannel *channel);
99 BLOCKING SocketStream *get_stream();
102 BLOCKING
bool try_connect_net(
const URLSpec &url);
109 #ifdef WANT_NATIVE_NET 110 BLOCKING
bool connect_native(
const URLSpec &url);
114 #ifdef SIMULATE_NETWORK_DELAY 115 BLOCKING
void start_delay(
double min_delay,
double max_delay);
116 BLOCKING
void stop_delay();
119 BLOCKING
bool check_datagram();
121 BLOCKING INLINE
void get_datagram(
Datagram &dg);
123 BLOCKING INLINE CHANNEL_TYPE get_msg_channel(
int offset = 0)
const;
124 BLOCKING INLINE
int get_msg_channel_count()
const;
125 BLOCKING INLINE CHANNEL_TYPE get_msg_sender()
const;
127 BLOCKING INLINE
unsigned int get_msg_type()
const;
129 INLINE
static const string &get_overflow_event_name();
131 BLOCKING
bool is_connected();
133 BLOCKING
bool send_datagram(
const Datagram &dg);
135 BLOCKING INLINE
void set_want_message_bundling(
bool flag);
136 BLOCKING INLINE
bool get_want_message_bundling()
const;
138 BLOCKING INLINE
void set_in_quiet_zone(
bool flag);
139 BLOCKING INLINE
bool get_in_quiet_zone()
const;
141 BLOCKING
void start_message_bundle();
142 BLOCKING INLINE
bool is_bundling_messages()
const;
143 BLOCKING
void send_message_bundle(
unsigned int channel,
unsigned int sender_channel);
144 BLOCKING
void abandon_message_bundles();
145 BLOCKING
void bundle_msg(
const Datagram &dg);
147 BLOCKING
bool consider_flush();
148 BLOCKING
bool flush();
150 BLOCKING
void disconnect();
151 BLOCKING
void shutdown();
153 INLINE
void set_simulated_disconnect(
bool simulated_disconnect);
154 INLINE
bool get_simulated_disconnect()
const;
156 INLINE
void toggle_verbose();
157 INLINE
void set_verbose(
bool verbose);
158 INLINE
bool get_verbose()
const;
160 INLINE
void set_time_warning(
float time_warning);
161 INLINE
float get_time_warning()
const;
164 bool do_check_datagram();
165 bool handle_update_field();
166 bool handle_update_field_owner();
168 void describe_message(ostream &out,
const string &prefix,
175 PyObject *_python_repository;
179 SocketStream *_http_conn;
189 #ifdef WANT_NATIVE_NET 195 bool _has_owner_view;
196 bool _handle_c_updates;
197 bool _client_datagram;
198 bool _handle_datagrams_internally;
199 int _tcp_header_size;
200 bool _simulated_disconnect;
208 std::vector<CHANNEL_TYPE> _msg_channels;
209 CHANNEL_TYPE _msg_sender;
210 unsigned int _msg_type;
212 static const string _overflow_event_name;
214 bool _want_message_bundling;
215 unsigned int _bundling_msgs;
216 typedef std::vector< string > BundledMsgVector;
217 BundledMsgVector _bundle_msgs;
222 #include "cConnectionRepository.I" 224 #endif // CCONNECTIONREPOSITORY_H
A container for a URL, e.g.
This flavor of ConnectionManager will queue up all of the reset-connection messages from the Connecti...
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...
This class handles threaded delivery of datagrams to various TCP or UDP sockets.
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. ...
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.