Skip to content

UdpSocket

Qt Base Class: QUdpSocket

Signature: QUdpSocket(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
AbstractSocketMixin
prettyqt.network.abstractsocket
QUdpSocket
PySide6.QtNetwork
QUdpSocket(self, parent: Optional[PySide6.QtCore.QObject] \= None) -> None

⋔ Inheritance diagram

graph TD
  1473574005616["network.UdpSocket"]
  1473574011472["network.AbstractSocketMixin"]
  1473299871632["core.IODeviceMixin"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473573816272["QtNetwork.QUdpSocket"]
  1473573840672["QtNetwork.QAbstractSocket"]
  1473288885184["QtCore.QIODevice"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473243629040["QtCore.QIODeviceBase"]
  1473574011472 --> 1473574005616
  1473299871632 --> 1473574011472
  1473299815024 --> 1473299871632
  140713234304496 --> 1473299815024
  1473573816272 --> 1473574005616
  1473573840672 --> 1473573816272
  1473288885184 --> 1473573840672
  1473288842240 --> 1473288885184
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208
  1473243629040 --> 1473288885184
  1473291690208 --> 1473243629040

🛈 DocStrings

Bases: AbstractSocketMixin, QUdpSocket

UDP Socket.

Source code in prettyqt\network\udpsocket.py
class UdpSocket(network.AbstractSocketMixin, network.QUdpSocket):
    """UDP Socket."""

    def get_multicast_interface(self) -> network.NetworkInterface:
        return network.NetworkInterface(self.multicastInterface())

    def receive_datagram(self, max_size: int | None = None) -> network.NetworkDatagram:
        if max_size is None:
            max_size = -1
        return network.NetworkDatagram(self.receiveDatagram(max_size))

⌗ Property table

Qt Property Type Doc
objectName QString