pStatServerControlMessage.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Filename: pStatServerControlMessage.h
  2. // Created by: drose (09Jul00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef PSTATSERVERCONTROLMESSAGE_H
  19. #define PSTATSERVERCONTROLMESSAGE_H
  20. #include "pandabase.h"
  21. #include "pvector.h"
  22. class Datagram;
  23. ////////////////////////////////////////////////////////////////////
  24. // Class : PStatServerControlMessage
  25. // Description : This kind of message is sent from the server to the
  26. // client on the TCP socket to establish critical
  27. // control information.
  28. ////////////////////////////////////////////////////////////////////
  29. class EXPCL_PANDA PStatServerControlMessage {
  30. public:
  31. PStatServerControlMessage();
  32. void encode(Datagram &datagram) const;
  33. bool decode(const Datagram &datagram);
  34. enum Type {
  35. T_invalid,
  36. T_hello,
  37. };
  38. Type _type;
  39. // Used for T_hello
  40. string _server_hostname;
  41. string _server_progname;
  42. int _udp_port;
  43. };
  44. #endif