WebSocket 에코 클라이언트
간단한 WebSocket 클라이언트 애플리케이션을 작성하는 방법을 보여줍니다.
이 에코 클라이언트는 WebSocket API를 사용하여 서버에 메시지를 전송하고, 서버가 반환하는 응답을 처리하는 방법을 보여줍니다. 이 예제에서는 단순히 응답 내용을 출력합니다.
이 클라이언트는 기본적으로 로컬 포트 1234에서 수신 대기 중인 서버에 WebSocket 연결을 시도합니다. 연결 시도가 성공하면 클라이언트는 서버에 메시지를 전송하고, 서버가 보내는 응답을 그대로 출력합니다. 그런 다음 클라이언트는 연결을 종료합니다.

설명을 위해, 보낸 메시지와 동일한 내용을 응답으로 반환하는 WebSocket Echo Server를 사용합니다.
WebSocket Echo Server도 참조하십시오 .
© 2026 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.