Panda3D
Functions
connectionManager.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "connectionManager.h"
#include "connection.h"
#include "connectionReader.h"
#include "connectionWriter.h"
#include "netAddress.h"
#include "config_net.h"
#include "socket_udp.h"
#include "socket_tcp_listen.h"
#include "lightMutexHolder.h"
#include "trueClock.h"
#include <net/if.h>
#include <ifaddrs.h>

Go to the source code of this file.

Functions

 PT (Connection) ConnectionManager
 Opens a socket for sending and/or receiving UDP packets. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
jns
Date
2000-02-07

Definition in file connectionManager.cxx.

Function Documentation

◆ PT()

PT ( Connection  )

Opens a socket for sending and/or receiving UDP packets.

This is a shorthand version of the function to directly establish communications to a named host and port.

Attempts to establish a TCP client connection to a server at the indicated address.

Creates a socket to be used as a rendezvous socket for a server to listen for TCP connections.

If the port number is greater than zero, the UDP connection will be opened for listening on the indicated port; otherwise, it will be useful only for sending.

Use a ConnectionReader and ConnectionWriter to handle the actual communication.

If the port number is greater than zero, the UDP connection will be opened for listening on the indicated port; otherwise, it will be useful only for sending.

This variant accepts both a hostname and port to listen on a particular interface; if the hostname is empty, all interfaces will be available, both IPv4 and IPv6.

If for_broadcast is true, this UDP connection will be configured to send and/or receive messages on the broadcast address (255.255.255.255); otherwise, these messages may be automatically filtered by the OS.

Use a ConnectionReader and ConnectionWriter to handle the actual communication.

The socket returned by this call should only be added to a ConnectionListener (not to a generic ConnectionReader).

This variant of this method accepts a single port, and will listen to that port on all available interfaces, both IPv4 and IPv6.

backlog is the maximum length of the queue of pending connections.

The socket returned by this call should only be added to a ConnectionListener (not to a generic ConnectionReader).

This variant of this method accepts a "hostname", which is usually just an IP address in dotted notation, and a port number. It will listen on the interface indicated by the IP address. If the IP address is empty string, it will listen on all interfaces.

backlog is the maximum length of the queue of pending connections.

The socket returned by this call should only be added to a ConnectionListener (not to a generic ConnectionReader).

This variant of this method accepts a NetAddress, which allows you to specify a specific interface to listen to.

backlog is the maximum length of the queue of pending connections.

If the connection is not established within timeout_ms milliseconds, a null connection is returned.

Definition at line 74 of file connectionManager.cxx.