Skip to content

PythonQt.QtNetwork.QUdpSocket · declarations 001

Back to PythonQt.QtNetwork.QUdpSocket

aboutToClose

aboutToClose(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.aboutToClose; argument details are not documented.

bytesWritten

bytesWritten(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.bytesWritten; argument details are not documented.

channelBytesWritten

channelBytesWritten(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.channelBytesWritten; argument details are not documented.

channelReadyRead

channelReadyRead(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.channelReadyRead; argument details are not documented.

connected

connected(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.connected; argument details are not documented.

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.destroyed; argument details are not documented.

disconnected

disconnected(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.disconnected; argument details are not documented.

errorOccurred

errorOccurred(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.errorOccurred; argument details are not documented.

hasPendingDatagrams

hasPendingDatagrams() -> bool

X.hasPendingDatagrams() -> bool

Supplemental documentation: Qt 5 reference:

bool QUdpSocket::hasPendingDatagrams() const

Returns true if at least one datagram is waiting to be read; otherwise returns false.

See also pendingDatagramSize() and readDatagram().

Upstream PySide2 reference signatures (binding differences may apply):

hasPendingDatagrams(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#hasPendingDatagrams

hostFound

hostFound(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.hostFound; argument details are not documented.

joinMulticastGroup

joinMulticastGroup(groupAddress: Any, iface: Any) -> bool

X.joinMulticastGroup(groupAddress, iface) -> bool

Supplemental documentation: Qt 5 reference:

bool QUdpSocket::joinMulticastGroup(const QHostAddress \&groupAddress)

Joins the multicast group specified by groupAddress on the default interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs.

Note that if you are attempting to join an IPv4 group, your socket must not be bound using IPv6 (or in dual mode, using QHostAddress::Any). You must use QHostAddress::AnyIPv4 instead.

This function returns true if successful; otherwise it returns false and sets the socket error accordingly.

Note: Joining IPv6 multicast groups without an interface selection is not supported in all operating systems. Consider using the overload where the interface is specified.

This function was introduced in Qt 4.8.

See also leaveMulticastGroup().

bool QUdpSocket::joinMulticastGroup(const QHostAddress \&groupAddress, const QNetworkInterface \&iface)

This is an overloaded function.

Joins the multicast group address groupAddress on the interface iface.

This function was introduced in Qt 4.8.

See also leaveMulticastGroup().

Upstream PySide2 reference signatures (binding differences may apply):

joinMulticastGroup(self, groupAddress: PySide2.QtNetwork.QHostAddress) -> bool
joinMulticastGroup(self, groupAddress: PySide2.QtNetwork.QHostAddress, iface: PySide2.QtNetwork.QNetworkInterface) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#joinMulticastGroup

leaveMulticastGroup

leaveMulticastGroup(groupAddress: Any, iface: Any) -> bool

X.leaveMulticastGroup(groupAddress, iface) -> bool

Supplemental documentation: Qt 5 reference:

bool QUdpSocket::leaveMulticastGroup(const QHostAddress \&groupAddress)

Leaves the multicast group specified by groupAddress on the default interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs.

This function returns true if successful; otherwise it returns false and sets the socket error accordingly.

Note: This function should be called with the same arguments as were passed to joinMulticastGroup().

This function was introduced in Qt 4.8.

See also joinMulticastGroup().

bool QUdpSocket::leaveMulticastGroup(const QHostAddress \&groupAddress, const QNetworkInterface \&iface)

This is an overloaded function.

Leaves the multicast group specified by groupAddress on the interface iface.

Note: This function should be called with the same arguments as were passed to joinMulticastGroup().

This function was introduced in Qt 4.8.

See also joinMulticastGroup().

Upstream PySide2 reference signatures (binding differences may apply):

leaveMulticastGroup(self, groupAddress: PySide2.QtNetwork.QHostAddress) -> bool
leaveMulticastGroup(self, groupAddress: PySide2.QtNetwork.QHostAddress, iface: PySide2.QtNetwork.QNetworkInterface) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#leaveMulticastGroup

multicastInterface

multicastInterface() -> Any

X.multicastInterface() -> PythonQt.QtNetwork.QNetworkInterface

Supplemental documentation: Qt 5 reference:

QNetworkInterface QUdpSocket::multicastInterface() const

Returns the interface for the outgoing interface for multicast datagrams. This corresponds to the IP_MULTICAST_IF socket option for IPv4 sockets and the IPV6_MULTICAST_IF socket option for IPv6 sockets. If no interface has been previously set, this function returns an invalid QNetworkInterface. The socket must be in BoundState, otherwise an invalid QNetworkInterface is returned.

This function was introduced in Qt 4.8.

See also setMulticastInterface().

Upstream PySide2 reference signatures (binding differences may apply):

multicastInterface(self) -> PySide2.QtNetwork.QNetworkInterface

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#multicastInterface

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.objectNameChanged; argument details are not documented.

pendingDatagramSize

pendingDatagramSize() -> int

X.pendingDatagramSize() -> int

Supplemental documentation: Qt 5 reference:

qint64 QUdpSocket::pendingDatagramSize() const

Returns the size of the first pending UDP datagram. If there is no datagram available, this function returns -1.

See also hasPendingDatagrams() and readDatagram().

Upstream PySide2 reference signatures (binding differences may apply):

pendingDatagramSize(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#pendingDatagramSize

proxyAuthenticationRequired

proxyAuthenticationRequired(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.proxyAuthenticationRequired; argument details are not documented.

readChannelFinished

readChannelFinished(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.readChannelFinished; argument details are not documented.

readDatagram

readDatagram(data: str, maxlen: int, host: Any, port: Any) -> int

X.readDatagram(data, maxlen, host, port) -> int

Supplemental documentation: Qt 5 reference:

qint64 QUdpSocket::readDatagram(char *data, qint64 maxSize, QHostAddress *address \= nullptr, quint16 *port \= nullptr)

Receives a datagram no larger than maxSize bytes and stores it in data. The sender's host address and port is stored in *address and *port (unless the pointers are nullptr).

Returns the size of the datagram on success; otherwise returns -1.

If maxSize is too small, the rest of the datagram will be lost. To avoid loss of data, call pendingDatagramSize() to determine the size of the pending datagram before attempting to read it. If maxSize is 0, the datagram will be discarded.

See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().

Upstream PySide2 reference signatures (binding differences may apply):

readDatagram(self, data: str, maxlen: int, host: PySide2.QtNetwork.QHostAddress) -> typing.Tuple[int, int]

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#readDatagram

readyRead

readyRead(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.readyRead; argument details are not documented.

setMulticastInterface

setMulticastInterface(iface: Any) -> None

X.setMulticastInterface(iface)

Supplemental documentation: Qt 5 reference:

void QUdpSocket::setMulticastInterface(const QNetworkInterface \&iface)

Sets the outgoing interface for multicast datagrams to the interface iface. This corresponds to the IP_MULTICAST_IF socket option for IPv4 sockets and the IPV6_MULTICAST_IF socket option for IPv6 sockets. The socket must be in BoundState, otherwise this function does nothing.

This function was introduced in Qt 4.8.

See also multicastInterface(), joinMulticastGroup(), and leaveMulticastGroup().

Upstream PySide2 reference signatures (binding differences may apply):

setMulticastInterface(self, iface: PySide2.QtNetwork.QNetworkInterface) -> None

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#setMulticastInterface

stateChanged

stateChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtNetwork.QUdpSocket.stateChanged; argument details are not documented.

writeDatagram

writeDatagram(datagram: Any, host: Any, port: Any) -> int

X.writeDatagram(datagram, host, port) -> int

Supplemental documentation: Qt 5 reference:

qint64 QUdpSocket::writeDatagram(const char *data, qint64 size, const QHostAddress \&address, quint16 port)

Sends the datagram at data of size size to the host address address at port port. Returns the number of bytes sent on success; otherwise returns -1.

Datagrams are always written as one block. The maximum size of a datagram is highly platform-dependent, but can be as low as 8192 bytes. If the datagram is too large, this function will return -1 and error() will return DatagramTooLargeError.

Sending datagrams larger than 512 bytes is in general disadvised, as even if they are sent successfully, they are likely to be fragmented by the IP layer before arriving at their final destination.

Warning: Calling this function on a connected UDP socket may result in an error and no packet being sent. If you are using a connected socket, use write() to send datagrams.

See also readDatagram() and write().

qint64 QUdpSocket::writeDatagram(const QNetworkDatagram \&datagram)

This is an overloaded function.

Sends the datagram datagram to the host address and port numbers contained in datagram, using the network interface and hop count limits also set there. If the destination address and port numbers are unset, this function will send to the address that was passed to connectToHost().

If the destination address is IPv6 with a non-empty scope id but differs from the interface index in datagram, it is undefined which interface the operating system will choose to send on.

The function returns the number of bytes sent if it succeeded or -1 if it encountered an error.

Warning: Calling this function on a connected UDP socket may result in an error and no packet being sent. If you are using a connected socket, use write() to send datagrams.

This function was introduced in Qt 5.8.

See also QNetworkDatagram::setDestination(), QNetworkDatagram::setHopLimit(), and QNetworkDatagram::setInterfaceIndex().

qint64 QUdpSocket::writeDatagram(const QByteArray \&datagram, const QHostAddress \&host, quint16 port)

This is an overloaded function.

Sends the datagram datagram to the host address host and at port port.

The function returns the number of bytes sent if it succeeded or -1 if it encountered an error.

Upstream PySide2 reference signatures (binding differences may apply):

writeDatagram(self, datagram: PySide2.QtCore.QByteArray, host: PySide2.QtNetwork.QHostAddress, port: int) -> int
writeDatagram(self, datagram: PySide2.QtNetwork.QNetworkDatagram) -> int

Source: https://doc.qt.io/archives/qt-5.15/qudpsocket.html#writeDatagram