WebSocket
웹소켓
WebSocket은 웹 앱과 서버 간의 양방향 연결을 유지합니다. 연결이 열려 있는 동안 어느 쪽이든 메시지를 보낼 수 있습니다.
다른 예시
두 명의 팀원이 한 게시판을 편집합니다. 저장된 모든 이동은 열린 연결을 통해 다른 화면으로 도달합니다.
주요 부분
- 01개방 핸드셰이크
- 02준비 상태
- 03수신 메시지
- 04발신 메시지
- 05닫기 및 앱 복구
사용할 때
메시지가 양방향으로 필요할 때 채팅, 협업 또는 실시간 이벤트에 사용하세요.
다음 경우에는 사용하지 마세요
가끔 간단한 읽기를 위해서는 일반 요청을 사용하세요. WebSocket에는 내장 인증이 없으므로 앱에서 접근 검사와 복구 규칙을 추가해야 합니다.
코드에서 사용된 이름
CONNECTING -> OPEN <-> messages -> CLOSING -> CLOSED 출시하기 전에
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with 웹소켓 (WebSocket)。 User context:두 명의 팀원이 한 게시판을 편집합니다. 저장된 모든 이동은 열린 연결을 통해 다른 화면으로 도달합니다. Technical concept or control:웹소켓 (WebSocket)。 Why it fits:메시지가 양방향으로 필요할 때 채팅, 협업 또는 실시간 이벤트에 사용하세요. Do not use it when:가끔 간단한 읽기를 위해서는 일반 요청을 사용하세요. WebSocket에는 내장 인증이 없으므로 앱에서 접근 검사와 복구 규칙을 추가해야 합니다. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):이 표준은 나열된 범위만 적용합니다. 시각적 스타일, 제품 결정, 또는 Vibulary 예시는 선택하지 않습니다. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
이 요청을 확인하세요
Review how 웹소켓 (WebSocket) is used now. Definition: WebSocket은 웹 앱과 서버 간의 양방향 연결을 유지합니다. 연결이 열려 있는 동안 어느 쪽이든 메시지를 보낼 수 있습니다. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.