mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
*** empty log message ***
This commit is contained in:
parent
6a612fe439
commit
5a56af5c67
@ -37,6 +37,7 @@
|
||||
#begin test_bin_target
|
||||
#define TARGET test_datagram
|
||||
#define LOCAL_LIBS net
|
||||
#define OTHER_LIBS pystub
|
||||
|
||||
#define SOURCES \
|
||||
test_datagram.cxx
|
||||
@ -46,6 +47,7 @@
|
||||
#begin test_bin_target
|
||||
#define TARGET test_spam_client
|
||||
#define LOCAL_LIBS net
|
||||
#define OTHER_LIBS pystub
|
||||
|
||||
#define SOURCES \
|
||||
datagram_ui.cxx datagram_ui.h test_spam_client.cxx
|
||||
@ -55,6 +57,7 @@
|
||||
#begin test_bin_target
|
||||
#define TARGET test_spam_server
|
||||
#define LOCAL_LIBS net
|
||||
#define OTHER_LIBS pystub
|
||||
|
||||
#define SOURCES \
|
||||
datagram_ui.cxx datagram_ui.h test_spam_server.cxx
|
||||
@ -64,6 +67,7 @@
|
||||
#begin test_bin_target
|
||||
#define TARGET test_tcp_client
|
||||
#define LOCAL_LIBS net
|
||||
#define OTHER_LIBS pystub
|
||||
|
||||
#define SOURCES \
|
||||
datagram_ui.cxx datagram_ui.h test_tcp_client.cxx
|
||||
@ -73,6 +77,7 @@
|
||||
#begin test_bin_target
|
||||
#define TARGET test_tcp_server
|
||||
#define LOCAL_LIBS net
|
||||
#define OTHER_LIBS pystub
|
||||
|
||||
#define SOURCES \
|
||||
datagram_ui.cxx datagram_ui.h test_tcp_server.cxx
|
||||
@ -82,6 +87,7 @@
|
||||
#begin test_bin_target
|
||||
#define TARGET test_udp
|
||||
#define LOCAL_LIBS net
|
||||
#define OTHER_LIBS pystub
|
||||
|
||||
#define SOURCES \
|
||||
datagram_ui.cxx datagram_ui.h test_udp.cxx
|
||||
|
@ -48,11 +48,16 @@ ConnectionManager::
|
||||
// Function: ConnectionManager::open_UDP_connection
|
||||
// Access: Public
|
||||
// Description: Opens a socket for sending and/or receiving UDP
|
||||
// packets. If the port is non-negative, it will be
|
||||
// bound to the connection; this is primarily a useful
|
||||
// to do when the UDP connection will be used for
|
||||
// reading. Use a ConnectionReader and
|
||||
// ConnectionWriter to handle the actual communication.
|
||||
// packets. If the port number is negative, it will not
|
||||
// be bound to a socket; this is generally a pointless
|
||||
// thing to do. If the port number is zero, a random
|
||||
// socket will be chosen. Otherwise, the specified
|
||||
// port number is used. Normally, you don't care what
|
||||
// port a UDP connection is opened on, so you should use
|
||||
// the default value of zero.
|
||||
//
|
||||
// Use a ConnectionReader and ConnectionWriter to handle
|
||||
// the actual communication.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(Connection) ConnectionManager::
|
||||
open_UDP_connection(int port) {
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
ConnectionManager();
|
||||
virtual ~ConnectionManager();
|
||||
|
||||
PT(Connection) open_UDP_connection(int port = -1);
|
||||
PT(Connection) open_UDP_connection(int port = 0);
|
||||
|
||||
PT(Connection) open_TCP_server_rendezvous(int port, int backlog);
|
||||
PT(Connection) open_TCP_client_connection(const NetAddress &address,
|
||||
|
@ -35,7 +35,9 @@ main(int argc, char *argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
nout << "Successfully opened UDP connection on port " << port << "\n";
|
||||
nout << "Successfully opened UDP connection on port "
|
||||
<< c->get_address().get_port() << " and IP "
|
||||
<< c->get_address().get_ip() << "\n";
|
||||
|
||||
RecentConnectionReader reader(&cm);
|
||||
reader.add_connection(c);
|
||||
|
Loading…
x
Reference in New Issue
Block a user