Go to the documentation of this file.
27 server.set_host(
"localhost", 4242);
30 int main(
int argc,
char *argv[]) {
33 PT(
Connection) con = prog.qManager->open_TCP_client_connection(prog.server,0);
35 nout <<
"Failed to open port to server process.\nMake sure maya2egg_server is running on localhost\n";
52 for (i = 0; i < argc; i++) {
60 prog.cWriter->
send(datagram, con);
67 prog.qManager->close_connection(con);
get_cwd
Returns the name of the current working directory.
bool data_available()
Returns true if a datagram is available on the queue; call get_data() to extract the datagram.
std::string to_os_specific() const
Converts the filename from our generic Unix-like convention (forward slashes starting with the root a...
void add_uint8(uint8_t value)
Adds an unsigned 8-bit integer to the datagram.
static void sleep(double seconds)
Suspends the current thread for at least the indicated amount of time.
bool get_reset_connection(PT(Connection) &connection)
If a previous call to reset_connection_available() returned true, this function will return informati...
Represents a single TCP or UDP socket for input or output.
bool reset_connection_available() const
Returns true if one of the readers/writers/listeners reported a connection reset recently.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool add_connection(Connection *connection)
Adds a new socket to the list of sockets the ConnectionReader will monitor.
void add_string(const std::string &str)
Adds a variable-length string to the datagram.
bool send(const Datagram &datagram, const PT(Connection) &connection, bool block=false)
Enqueues a datagram for transmittal on the indicated socket.
This class handles threaded delivery of datagrams to various TCP or UDP sockets.
A specific kind of Datagram, especially for sending across or receiving from a network.
This flavor of ConnectionManager will queue up all of the reset-connection messages from the Connecti...
This is the general base class for a file-converter program that reads some model file format and gen...
This flavor of ConnectionReader will read from its sockets and queue up all of the datagrams read for...
The name of a file, such as a texture file or an Egg file.