55class EXPCL_DIRECT_DIRECTD DirectD {
76 int client_ready(
const std::string& server_host,
int port,
const std::string& cmd);
88 int tell_server(
const std::string& server_host,
int port,
const std::string& cmd);
105 int server_ready(
const std::string& client_host,
int port);
113 int connect_to(
const std::string& server_host,
int port);
128 void start_app(
const std::string& cmd);
129 void kill_app(
int index);
131 virtual void handle_command(
const std::string& cmd);
133 void send_one_message(
const std::string& host_name,
134 int port,
const std::string& message);
145 typedef pvector<
long > PidStack;
149 typedef pset< PT(Connection) > ConnectionSet;
150 ConnectionSet _connections;
154 void check_for_new_clients();
155 void check_for_datagrams();
156 void check_for_lost_connection();
This class handles threaded delivery of datagrams to various TCP or UDP sockets.
void send_command(const std::string &cmd)
Send the same command string to all current connections.
int tell_server(const std::string &server_host, int port, const std::string &cmd)
Tell the server to do the command cmd.
int server_ready(const std::string &client_host, int port)
Call this function from the server when import ShowbaseGlobal is nearly finished.
int client_ready(const std::string &server_host, int port, const std::string &cmd)
Call this function from the client when import ShowbaseGlobal is nearly finished.
void disconnect_from(const std::string &server_host, int port)
This is the counterpart to connect_to().
void listen_to(int port, int backlog=8)
Call listen_to in the server.
bool wait_for_servers(int count, int timeout_ms=2 *60 *1000)
Call this function from the client after calling <count> client_ready() calls.
int connect_to(const std::string &server_host, int port)
Call connect_to from client for each server.
A specific kind of Datagram, especially for sending across or receiving from a network.
This flavor of ConnectionListener will queue up all of the TCP connections it established for later d...
This flavor of ConnectionManager will queue up all of the reset-connection messages from the Connecti...
This flavor of ConnectionReader will read from its sockets and queue up all of the datagrams read for...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.