QueuedConnectionReader

from panda3d.net import QueuedConnectionReader
class QueuedConnectionReader

Bases: ConnectionReader, QueuedReturn_NetDatagram

This flavor of ConnectionReader will read from its sockets and queue up all of the datagrams read for later receipt by the client code. This class is useful for client code that doesn’t want to deal with threading and is willing to poll for datagrams at its convenience.

Inheritance diagram

Inheritance diagram of QueuedConnectionReader

__init__(*args, **kwargs)
dataAvailable()

C++ Interface: data_available(const QueuedConnectionReader self)

/**
  • Returns true if a datagram is available on the queue; call get_data() to

  • extract the datagram.

*/

data_available()

C++ Interface: data_available(const QueuedConnectionReader self)

/**
  • Returns true if a datagram is available on the queue; call get_data() to

  • extract the datagram.

*/

getData()

C++ Interface: get_data(const QueuedConnectionReader self, NetDatagram result) get_data(const QueuedConnectionReader self, Datagram result)

/**
  • If a previous call to data_available() returned true, this function will

  • return the datagram that has become available.

  • The return value is true if a datagram was successfully returned, or false

  • if there was, in fact, no datagram available. (This may happen if there

  • are multiple threads accessing the QueuedConnectionReader).

*/

/**
  • This flavor of QueuedConnectionReader::get_data(), works like the other,

  • except that it only fills a Datagram object, not a NetDatagram object.

  • This means that the Datagram cannot be queried for its source Connection

  • and/or NetAddress, but it is useful in all other respects.

*/

get_data()

C++ Interface: get_data(const QueuedConnectionReader self, NetDatagram result) get_data(const QueuedConnectionReader self, Datagram result)

/**
  • If a previous call to data_available() returned true, this function will

  • return the datagram that has become available.

  • The return value is true if a datagram was successfully returned, or false

  • if there was, in fact, no datagram available. (This may happen if there

  • are multiple threads accessing the QueuedConnectionReader).

*/

/**
  • This flavor of QueuedConnectionReader::get_data(), works like the other,

  • except that it only fills a Datagram object, not a NetDatagram object.

  • This means that the Datagram cannot be queried for its source Connection

  • and/or NetAddress, but it is useful in all other respects.

*/

upcastToConnectionReader()

C++ Interface: upcast_to_ConnectionReader(const QueuedConnectionReader self)

upcast from QueuedConnectionReader to ConnectionReader

upcastToQueuedReturnNetDatagram()

C++ Interface: upcast_to_QueuedReturn_NetDatagram(const QueuedConnectionReader self)

upcast from QueuedConnectionReader to QueuedReturn< NetDatagram >

upcast_to_ConnectionReader()

C++ Interface: upcast_to_ConnectionReader(const QueuedConnectionReader self)

upcast from QueuedConnectionReader to ConnectionReader

upcast_to_QueuedReturn_NetDatagram()

C++ Interface: upcast_to_QueuedReturn_NetDatagram(const QueuedConnectionReader self)

upcast from QueuedConnectionReader to QueuedReturn< NetDatagram >