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