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