이 페이지에서

WebSocketServer QML Type

QWebSocketServer 에 대한 QML 인터페이스. 더 보기...

Import Statement: import QtWebSockets 1.12

속성

신호

상세 설명

부동산 관련 서류

accept : bool

서버가 수신 대기 중일 때 들어오는 클라이언트 연결을 허용하려면 true로 설정하십시오. false로 설정하면 들어오는 연결이 거부됩니다. 기본적으로 연결은 허용됩니다.

errorString : string [read-only]

오류가 발생한 경우 문자열로 변환된 오류 메시지.

host : string

서버의 호스트 주소입니다. 기본적으로 localhost가 사용됩니다.

listen : bool

서버가 클라이언트 연결을 수신 대기해야 할 때는 true로, 그렇지 않을 때는 false로 설정합니다. true로 설정하면 서버는 host와 port로 정의된 지정된 URL에서 수신 대기하며, accept가 true일 때 들어오는 클라이언트 연결을 수락합니다. 그렇지 않으면 서버가 종료됩니다. 기본적으로 서버는 수신 대기하지 않습니다.

name : string

HTTP 핸드셰이크 단계에서 사용되는 이 서버의 이름입니다.

port : int

이 서버가 수신 대기 중인 포트입니다. 값은 0~65535 범위여야 합니다.

기본적으로 포트는 자동으로 선택됩니다.

supportedSubprotocols : list<string> [since 6.4]

서버에서 지원하는 프로토콜 목록입니다.

이 속성은 Qt 6.4에서 도입되었습니다.

url : url [read-only]

클라이언트 WebSocket이 연결할 수 있는 서버 URL입니다. 이 URL은 ws:// 스키마를 사용하며, 서버가 수신 대기하는 포트와 서버의 호스트 주소를 포함합니다.

Signal 문서

clientConnected(WebSocket webSocket)

이 신호는 클라이언트가 이 서버에 연결될 때 발생합니다. ` webSocket `는 새로 생성된 ` WebSocket`입니다.

참고: 해당 핸들러는 onClientConnected 입니다.

© 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.