Panda3D

pStatServerControlMessage.h

00001 // Filename: pStatServerControlMessage.h
00002 // Created by:  drose (09Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PSTATSERVERCONTROLMESSAGE_H
00016 #define PSTATSERVERCONTROLMESSAGE_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "pvector.h"
00021 
00022 class Datagram;
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : PStatServerControlMessage
00026 // Description : This kind of message is sent from the server to the
00027 //               client on the TCP socket to establish critical
00028 //               control information.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDA_PSTATCLIENT PStatServerControlMessage {
00031 public:
00032   PStatServerControlMessage();
00033 
00034   void encode(Datagram &datagram) const;
00035   bool decode(const Datagram &datagram);
00036 
00037   enum Type {
00038     T_invalid,
00039     T_hello,
00040   };
00041 
00042   Type _type;
00043 
00044   // Used for T_hello
00045   string _server_hostname;
00046   string _server_progname;
00047   int _udp_port;
00048 };
00049 
00050 
00051 #endif
00052 
 All Classes Functions Variables Enumerations