blob: 871a91632f4f94af32ec890ec7cf2320f9ae3092 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
/*!
\example echoclient
\title WebSocket Echo Client
\examplecategory {Networking}
\ingroup qtwebsockets-examples
\brief Show how to write a simple WebSocket client application.
The Echo Client shows how to use the \l {Qt WebSockets}{WebSocket}
API to send a message to a server and process whatever response the
server returns - in this case, simply reporting the response.
The client by default opens a WebSocket connection to a server listening
on local port 1234. When the connection attempt is successful, the client
will send a message to the server and print out whatever response the
server sends. The client then closes the connection.
\image echoclient-console-example.webp WebSocket Echo Console Client
For the sake of illustration, we use the \l {WebSocket Echo Server}, whose
reply is simply the message that was sent.
\sa {WebSocket Echo Server}
*/
|