diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-03-15 14:26:26 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-06-21 17:01:03 +0000 |
commit | ed775e794c72b237d148fd7d3ea248c803c30075 (patch) | |
tree | 12931bd47d1691b19472b88c1f4b4319d7847e18 /examples/network/secureudpserver/nicselector.ui | |
parent | d502d883fd104aa7a6b20cd49d1ea4c92715df71 (diff) |
Add a secure UDP server example
It's a simple DTLS server, implemented with QUdpSocket,
QDtlsClientVerifier and QDtls. The server is configured
to use PSK only (it has no certificate/key).
The server uses a single QUdpSocket socket and
de-multiplexes UDP datagrams internally (thus
it can work with several clients simultaneously).
Future update will probably add more options (like
configuring with certificate/key, etc). For now -
it's as minimalistic and simple as possible.
Task-number: QTBUG-67596
Change-Id: Ic7d18dbab6dbcc9ed44c82e69a2b364df24aa256
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/network/secureudpserver/nicselector.ui')
-rw-r--r-- | examples/network/secureudpserver/nicselector.ui | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/examples/network/secureudpserver/nicselector.ui b/examples/network/secureudpserver/nicselector.ui new file mode 100644 index 0000000000..b0ba376b66 --- /dev/null +++ b/examples/network/secureudpserver/nicselector.ui @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>NicSelector</class> + <widget class="QDialog" name="NicSelector"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>373</width> + <height>213</height> + </rect> + </property> + <property name="windowTitle"> + <string>IP and port</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetFixedSize</enum> + </property> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Listen on address:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="ipSelector"> + <property name="minimumSize"> + <size> + <width>250</width> + <height>0</height> + </size> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="sizeConstraint"> + <enum>QLayout::SetFixedSize</enum> + </property> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Port:</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="portSelector"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>NicSelector</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>NicSelector</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> |