# QUdpSocket Class Reference

### [com.trolltech.qt.network package]

Inherits QAbstractSocket.

### Constructor

- void QUdpSocket(QObject parent)

### Constructor Properties

- prototype: The QUdpSocket prototype object
- DefaultForPlatform = 0x0
- ShareAddress = 0x1
- DontShareAddress = 0x2
- ReuseAddressHint = 0x4
- BindFlag( value )
- BindMode( value1, value2, ... )

### Prototype Object Properties

The QUdpSocket prototype object inherits properties from the QAbstractSocket prototype object and also has the following properties.

- bool bind(QHostAddress address, unsigned short port)
- bool hasPendingDatagrams()
- bool joinMulticastGroup(QHostAddress groupAddress)
- bool leaveMulticastGroup(QHostAddress groupAddress)
- QNetworkInterface multicastInterface()
- qint64 pendingDatagramSize()
- qint64 readDatagram(char data, qint64 maxlen, QHostAddress host, unsigned short port)
- void setMulticastInterface(QNetworkInterface iface)
- qint64 writeDatagram(QByteArray datagram, QHostAddress host, unsigned short port)

### Instance Properties

QUdpSocket objects have no special properties beyond those inherited from the QUdpSocket prototype object.