00001 // Filename: pStatServerControlMessage.h 00002 // Created by: drose (09Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef PSTATSERVERCONTROLMESSAGE_H 00020 #define PSTATSERVERCONTROLMESSAGE_H 00021 00022 #include <pandabase.h> 00023 00024 #include "pvector.h" 00025 00026 class Datagram; 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : PStatServerControlMessage 00030 // Description : This kind of message is sent from the server to the 00031 // client on the TCP socket to establish critical 00032 // control information. 00033 //////////////////////////////////////////////////////////////////// 00034 class EXPCL_PANDA PStatServerControlMessage { 00035 public: 00036 PStatServerControlMessage(); 00037 00038 void encode(Datagram &datagram) const; 00039 bool decode(const Datagram &datagram); 00040 00041 enum Type { 00042 T_invalid, 00043 T_hello, 00044 }; 00045 00046 Type _type; 00047 00048 // Used for T_hello 00049 string _server_hostname; 00050 string _server_progname; 00051 int _udp_port; 00052 }; 00053 00054 00055 #endif 00056