보안 웹소켓 에코 서버

보안 웹소켓(wss)을 통해 클라이언트에 응답하는 간단한 서버입니다.

보안 웹소켓 에코 서버 예제는 QWebSocketServer 클래스를 사용하여 보안 소켓을 통한 간단한 에코 서버를 구현하는 방법을 보여줍니다(wss). 이 예제가 작동하려면 TLS 지원이 필요합니다. 이 서버는 클라이언트에 자신을 인증하고 성공하면 클라이언트로부터 메시지를 수락하여 응답할 수 있습니다. 설명을 위해 이 서버의 응답은 단순히 전송된 메시지의 복사본입니다.

이 서버는 자체 서명된 인증서와 키로 구성됩니다. 이 서버에 접속하는 클라이언트가 Secure WebSocket Echo 클라이언트처럼 해당 인증서를 신뢰하도록 구성되지 않은 경우 이 서버는 거부됩니다.

Secure WebSocket Echo HTML Client

이 예제에는 HTML 기반 클라이언트가 있습니다. 그러나 사용하는 브라우저가 위에서 설명한 대로 인증서를 지원하거나 로컬 호스트 주소에 대한 TLS 오류를 무시하는 경우에만 작동합니다.

예제 프로젝트 @ code.qt.io

보안 웹소켓 에코 클라이언트웹소켓 에코 서버도참조하세요 .

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.