35 if (_target ==
nullptr) {
38 return send(data, _target,
true);
47 return (_target ==
nullptr || _target->get_socket() ==
nullptr);
56 if (_target !=
nullptr) {
The primary interface to the low-level networking layer in this package.
This class handles threaded delivery of datagrams to various TCP or UDP sockets.
bool send(const Datagram &datagram, const PT(Connection) &connection, bool block=false)
Enqueues a datagram for transmittal on the indicated socket.
virtual void flush()
Ensures that all datagrams previously written will be visible on the stream.
DatagramSinkNet(ConnectionManager *manager, int num_threads)
Creates a new DatagramSinkNet with the indicated number of threads to handle writing.
virtual bool is_error()
Returns true if there is an error on the target connection, or if the target has never been set.
virtual bool put_datagram(const Datagram &data)
Sends the given datagram to the target.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.