from panda3d.core import DatagramSinkNet
- class DatagramSinkNet
This class accepts datagrams one-at-a-time and sends them over the net, via a TCP connection.
- __init__(manager: ConnectionManager, num_threads: int)
Creates a new
DatagramSinkNetwith the indicated number of threads to handle writing. Normally num_threads should be either 0 or 1 to guarantee that datagrams are delivered in the same order in which they were sent.
Ensures that all datagrams previously written will be visible on the stream.
- getTarget() Connection
Returns the current target Connection, or NULL if the target has not yet been set. See
- isError() bool
Returns true if there is an error on the target connection, or if the target has never been set.
- putDatagram(data: Datagram) bool
Sends the given datagram to the target. Returns true on success, false if there is an error. Blocks if necessary until the target is ready.