033a1a2793
A simple application that establishes DTLS connection(s) and sends/receives datagrams. Class DtlsAssociation is essentially a QUdpSocket|QDtls pair: it initiates a handshake, handles timeouts and errors. After establishing an encrypted connection it sends messages to the server and processes responses. Task-number: QTBUG-67596 Change-Id: I92d481b7dfd2459e6a93c754b338a2e897a7feaf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
199 lines
5.3 KiB
XML
199 lines
5.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>MainWindow</class>
|
|
<widget class="QMainWindow" name="MainWindow">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>1200</width>
|
|
<height>550</height>
|
|
</rect>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>1200</width>
|
|
<height>550</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>1200</width>
|
|
<height>550</height>
|
|
</size>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>DTLS client</string>
|
|
</property>
|
|
<widget class="QWidget" name="centralwidget">
|
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
<item>
|
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
<item>
|
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>590</width>
|
|
<height>400</height>
|
|
</size>
|
|
</property>
|
|
<property name="title">
|
|
<string>DTLS info messages:</string>
|
|
</property>
|
|
<property name="flat">
|
|
<bool>true</bool>
|
|
</property>
|
|
<widget class="QTextEdit" name="clientMessages">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>10</x>
|
|
<y>30</y>
|
|
<width>570</width>
|
|
<height>360</height>
|
|
</rect>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>570</width>
|
|
<height>360</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>570</width>
|
|
<height>360</height>
|
|
</size>
|
|
</property>
|
|
<property name="acceptDrops">
|
|
<bool>false</bool>
|
|
</property>
|
|
<property name="frameShape">
|
|
<enum>QFrame::StyledPanel</enum>
|
|
</property>
|
|
<property name="frameShadow">
|
|
<enum>QFrame::Plain</enum>
|
|
</property>
|
|
<property name="readOnly">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
<item>
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<item>
|
|
<widget class="QPushButton" name="connectButton">
|
|
<property name="text">
|
|
<string>Connect ...</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="shutdownButton">
|
|
<property name="text">
|
|
<string>Shutdown connections</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<spacer name="horizontalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Horizontal</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>40</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_2">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>580</width>
|
|
<height>490</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>580</width>
|
|
<height>490</height>
|
|
</size>
|
|
</property>
|
|
<property name="title">
|
|
<string>Received datagrams:</string>
|
|
</property>
|
|
<property name="flat">
|
|
<bool>true</bool>
|
|
</property>
|
|
<widget class="QTextEdit" name="serverMessages">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>10</x>
|
|
<y>30</y>
|
|
<width>560</width>
|
|
<height>450</height>
|
|
</rect>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>560</width>
|
|
<height>450</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>560</width>
|
|
<height>450</height>
|
|
</size>
|
|
</property>
|
|
<property name="frameShape">
|
|
<enum>QFrame::StyledPanel</enum>
|
|
</property>
|
|
<property name="frameShadow">
|
|
<enum>QFrame::Plain</enum>
|
|
</property>
|
|
<property name="readOnly">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QMenuBar" name="menubar">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>1200</width>
|
|
<height>22</height>
|
|
</rect>
|
|
</property>
|
|
</widget>
|
|
<widget class="QStatusBar" name="statusbar"/>
|
|
</widget>
|
|
<resources/>
|
|
<connections/>
|
|
</ui>
|