資源簡(jiǎn)介
QWebSocket 添加 SLL 加密的 Demo,支持單向認(rèn)證和雙向認(rèn)證,支持windows和linux雙平臺(tái)。
代碼片段和文件信息
/****************************************************************************
**
**?Copyright?(C)?2016?Kurt?Pattyn?.
**?Contact:?https://www.qt.io/licensing/
**
**?This?file?is?part?of?the?QtWebSockets?module?of?the?Qt?Toolkit.
**
**?$QT_BEGIN_LICENSE:BSD$
**?Commercial?License?Usage
**?Licensees?holding?valid?commercial?Qt?licenses?may?use?this?file?in
**?accordance?with?the?commercial?license?agreement?provided?with?the
**?Software?or?alternatively?in?accordance?with?the?terms?contained?in
**?a?written?agreement?between?you?and?The?Qt?Company.?For?licensing?terms
**?and?conditions?see?https://www.qt.io/terms-conditions.?For?further
**?information?use?the?contact?form?at?https://www.qt.io/contact-us.
**
**?BSD?License?Usage
**?Alternatively?you?may?use?this?file?under?the?terms?of?the?BSD?license
**?as?follows:
**
**?“Redistribution?and?use?in?source?and?binary?forms?with?or?without
**?modification?are?permitted?provided?that?the?following?conditions?are
**?met:
**???*?Redistributions?of?source?code?must?retain?the?above?copyright
**?????notice?this?list?of?conditions?and?the?following?disclaimer.
**???*?Redistributions?in?binary?form?must?reproduce?the?above?copyright
**?????notice?this?list?of?conditions?and?the?following?disclaimer?in
**?????the?documentation?and/or?other?materials?provided?with?the
**?????distribution.
**???*?Neither?the?name?of?The?Qt?Company?Ltd?nor?the?names?of?its
**?????contributors?may?be?used?to?endorse?or?promote?products?derived
**?????from?this?software?without?specific?prior?written?permission.
**
**
**?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS
**?“AS?IS“?AND?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT
**?LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR
**?A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.?IN?NO?EVENT?SHALL?THE?COPYRIGHT
**?OWNER?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL
**?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT
**?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE
**?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY
**?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT
**?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY?OUT?OF?THE?USE
**?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.“
**
**?$QT_END_LICENSE$
**
****************************************************************************/
#include?
#include?“sslechoclient.h“
int?main(int?argc?char?*argv[])
{
????QCoreApplication?a(argc?argv);
????SslEchoClient?client(QUrl(QStringLiteral(“wss://localhost:1234“)));
????Q_UNUSED(client);
????return?a.exec();
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2796??2019-06-13?15:07??sslechoclient\main.cpp
?????文件???????4171??2019-06-13?15:33??sslechoclient\sslechoclient.cpp
?????文件???????3159??2019-06-12?16:37??sslechoclient\sslechoclient.h
?????文件????????284??2018-11-08?00:00??sslechoclient\sslechoclient.pro
?????文件????2390960??2019-05-08?17:13??sslechoserver\libeay32.dll
?????文件???????1112??2018-11-08?00:00??sslechoserver\localhost.cert
?????文件???????1702??2018-11-08?00:00??sslechoserver\localhost.key
?????文件???????2756??2018-11-08?00:00??sslechoserver\main.cpp
?????文件????????214??2019-06-13?15:13??sslechoserver\securesocketclient.qrc
?????文件???????1166??2019-06-13?15:32??sslechoserver\server.cert
?????文件????????992??2019-06-13?15:31??sslechoserver\server.csr
?????文件???????1702??2019-06-13?15:31??sslechoserver\server.key
?????文件?????381872??2019-05-08?17:13??sslechoserver\ssleay32.dll
?????文件???????3846??2019-06-12?17:27??sslechoserver\sslechoclient.html
?????文件???????5986??2019-06-13?15:13??sslechoserver\sslechoserver.cpp
?????文件???????3307??2018-11-08?00:00??sslechoserver\sslechoserver.h
?????文件????????362??2018-11-08?00:00??sslechoserver\sslechoserver.pro
?????文件????????303??2018-11-08?00:00??websockets.pro
?????目錄??????????0??2019-06-27?18:23??sslechoclient
?????目錄??????????0??2019-06-27?18:23??sslechoserver
-----------?---------??----------?-----??----
??????????????2806690????????????????????20
評(píng)論
共有 條評(píng)論