Panda3D
|
DirectD is a client/server app for starting panda/direct. More...
#include "directd.h"
Public Member Functions | |
int | client_ready (const string &server_host, int port, const string &cmd) |
int | connect_to (const string &server_host, int port) |
void | disconnect_from (const string &server_host, int port) |
void | listen_to (int port, int backlog=8) |
void | send_command (const string &cmd) |
int | server_ready (const string &client_host, int port) |
int | tell_server (const string &server_host, int port, const string &cmd) |
bool | wait_for_servers (int count, int timeout_ms=2 *60 *1000) |
Protected Types | |
typedef pset< PT(Connection) > | ConnectionSet |
typedef pvector< long > | PidStack |
Protected Member Functions | |
void | check_for_datagrams () |
void | check_for_lost_connection () |
void | check_for_new_clients () |
virtual void | handle_command (const string &cmd) |
void | handle_datagram (NetDatagram &datagram) |
void | kill_all () |
void | kill_app (int index) |
void | send_one_message (const string &host_name, int port, const string &message) |
void | start_app (const string &cmd) |
Protected Attributes | |
QueuedConnectionManager | _cm |
ConnectionSet | _connections |
HANDLE | _jobObject |
QueuedConnectionListener | _listener |
PidStack | _pids |
QueuedConnectionReader | _reader |
bool | _shutdown |
bool | _useOldStuff |
ConnectionWriter | _writer |
DirectD is a client/server app for starting panda/direct.
Usage: Start a directd server on each of the machines you which to start panda on.
Start a directd client on the controlling machine or import ShowBaseGlobal with the xxxxx flag in your Configrc. The client will connect each of the servers in the xxxxx list in your Configrc.
There are two API groups in this class, they are:
listen_to() client_ready() or tell_server() wait_for_servers() server_ready()
and:
connect_to() send_command() disconnect_from()
The second group was from a more general implementation of DirectD. The first group summarizes the main intents of DirectD. Both groups are presented in order chronologically by their intended usage. The first group will probably provide everthing needed for DirectD.