Panda3D
Loading...
Searching...
No Matches
pStatClientControlMessage.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 pStatClientControlMessage.h
10 * @author drose
11 * @date 2000-07-09
12 */
13
14#ifndef PSTATCLIENTCONTROLMESSAGE_H
15#define PSTATCLIENTCONTROLMESSAGE_H
16
17#include "pandabase.h"
18
19#include "pStatCollectorDef.h"
20
21#include "pvector.h"
22
23class Datagram;
25
26/**
27 * This kind of message is sent from the client to the server on the TCP
28 * socket to establish critical control information.
29 */
30class EXPCL_PANDA_PSTATCLIENT PStatClientControlMessage {
31public:
33
34 void encode(Datagram &datagram) const;
35 bool decode(const Datagram &datagram, PStatClientVersion *version);
36
37 enum Type {
38 T_datagram = 0,
39 T_hello,
40 T_define_collectors,
41 T_define_threads,
42 T_expire_thread,
43 T_invalid
44 };
45
46 Type _type;
47
48 // Used for T_hello
49 std::string _client_hostname;
50 std::string _client_progname;
51 int _major_version;
52 int _minor_version;
53
54 // Used for T_define_collectors
56
57 // Used for T_define_threads
58 int _first_thread_index;
60};
61
62
63#endif
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition datagram.h:38
This kind of message is sent from the client to the server on the TCP socket to establish critical co...
Records the version number of a particular client.
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.