Panda3D

Loading...
Searching...
No Matches
pStatMonitor.I
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 pStatMonitor.I
10 * @author drose
11 * @date 2000-07-14
12 */
13
14/**
15 * Returns the server that owns this monitor.
16 */
17INLINE PStatServer *PStatMonitor::
18 get_server() {
19 return _server;
20}
21
22/**
23 * Returns the client data associated with this monitor.
24 */
25INLINE const PStatClientData *PStatMonitor::
26 get_client_data() const {
27 return _client_data;
28}
29
30/**
31 * Returns the name of the indicated collector, if it is known.
32 */
33INLINE std::string PStatMonitor::
34 get_collector_name(int collector_index) {
35 if (!_client_data.is_null() &&
36 _client_data->has_collector(collector_index)) {
37 return _client_data->get_collector_name(collector_index);
38 }
39 return "Unknown";
40}
41
42/**
43 * Returns true if we've yet received the "hello" message from the client
44 * indicating its name, etc.
45 */
46INLINE bool PStatMonitor::
47 is_client_known() const {
48 return _client_known;
49}
50
51/**
52 * Returns the hostname of the client we're connected to, if known. This may
53 * not be known immediately at creation time, but should be learned shortly
54 * thereafter when we receive the client's "hello" message. See
55 * is_client_known().
56 */
57INLINE std::string PStatMonitor::
58 get_client_hostname() const {
59 return _client_hostname;
60}
61
62/**
63 * Returns the program name of the client we're connected to, if known. This
64 * may not be known immediately at creation time, but should be learned
65 * shortly thereafter when we receive the client's "hello" message. See
66 * is_client_known().
67 */
68INLINE std::string PStatMonitor::
69 get_client_progname() const {
70 return _client_progname;
71}
PStatClientData
The data associated with a particular client, but not with any one particular frame or thread: the li...
Definition pStatClientData.h:36
PStatMonitor::get_client_progname
std::string get_client_progname() const
Returns the program name of the client we're connected to, if known.
Definition pStatMonitor.I:69
PStatMonitor::is_client_known
bool is_client_known() const
Returns true if we've yet received the "hello" message from the client indicating its name,...
Definition pStatMonitor.I:47
PStatMonitor::get_client_hostname
std::string get_client_hostname() const
Returns the hostname of the client we're connected to, if known.
Definition pStatMonitor.I:58
PStatMonitor::get_collector_name
std::string get_collector_name(int collector_index)
Returns the name of the indicated collector, if it is known.
Definition pStatMonitor.I:34
PStatMonitor::get_client_data
const PStatClientData * get_client_data() const
Returns the client data associated with this monitor.
Definition pStatMonitor.I:26
PStatMonitor::get_server
PStatServer * get_server()
Returns the server that owns this monitor.
Definition pStatMonitor.I:18
PStatServer
The overall manager of the network connections.
Definition pStatServer.h:36