Add version support

This commit is contained in:
David Rose 2001-05-19 00:01:45 +00:00
parent 9355785267
commit 639af88c04
2 changed files with 25 additions and 0 deletions

View File

@ -40,6 +40,29 @@ got_hello() {
<< get_client_hostname() << "\n";
}
////////////////////////////////////////////////////////////////////
// Function: TextMonitor::got_bad_version
// Access: Public, Virtual
// Description: Like got_hello(), this is called when the "hello"
// message has been received from the client. At this
// time, the client's hostname and program name will be
// known. However, the client appears to be an
// incompatible version and the connection will be
// terminated; the monitor should issue a message to
// that effect.
////////////////////////////////////////////////////////////////////
void TextMonitor::
got_bad_version(int client_major, int client_minor,
int server_major, int server_minor) {
nout
<< "Rejected connection by " << get_client_progname()
<< " from " << get_client_hostname()
<< ". Client uses PStats version "
<< client_major << "." << client_minor
<< ", while server expects PStats version "
<< server_major << "." << server_minor << ".\n";
}
////////////////////////////////////////////////////////////////////
// Function: TextMonitor::new_data
// Access: Public, Virtual

View File

@ -22,6 +22,8 @@ public:
virtual string get_monitor_name();
virtual void got_hello();
virtual void got_bad_version(int client_major, int client_minor,
int server_major, int server_minor);
virtual void new_data(int thread_index, int frame_number);
virtual void lost_connection();
virtual bool is_thread_safe();