Panda3D
 All Classes Functions Variables Enumerations
pStatServerControlMessage.h
1 // Filename: pStatServerControlMessage.h
2 // Created by: drose (09Jul00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PSTATSERVERCONTROLMESSAGE_H
16 #define PSTATSERVERCONTROLMESSAGE_H
17 
18 #include "pandabase.h"
19 
20 #include "pvector.h"
21 
22 class Datagram;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : PStatServerControlMessage
26 // Description : This kind of message is sent from the server to the
27 // client on the TCP socket to establish critical
28 // control information.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_PSTATCLIENT PStatServerControlMessage {
31 public:
33 
34  void encode(Datagram &datagram) const;
35  bool decode(const Datagram &datagram);
36 
37  enum Type {
38  T_invalid,
39  T_hello,
40  };
41 
42  Type _type;
43 
44  // Used for T_hello
45  string _server_hostname;
46  string _server_progname;
47  int _udp_port;
48 };
49 
50 
51 #endif
52 
This kind of message is sent from the server to the client on the TCP socket to establish critical co...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:43