웹소켓 (WebSocket)
클라이언트와 서버 간의 실시간 양방향 통신을 위한 프로토콜입니다.
웹소켓은 HTTP와 다릅니다. HTTP는 요청-응답 기반이지만, 웹소켓은 데이터가 양방향으로 동시에 흐를 수 있는 지속적인 연결을 가능하게 합니다. 채팅, 게임, 실시간 업데이트가 필요한 앱에 이상적입니다.
graph LR
Center["웹소켓 (WebSocket)"]:::main
Rel_http["http"]:::related -.-> Center
click Rel_http "/terms/http"
Rel_tcp_ip["tcp-ip"]:::related -.-> Center
click Rel_tcp_ip "/terms/tcp-ip"
Rel_message_broker["message-broker"]:::related -.-> Center
click Rel_message_broker "/terms/message-broker"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 5살도 이해할 수 있게 설명
Generated ELI5 content
🤓 Expert Deep Dive
Generated expert content
❓ 자주 묻는 질문
How is WebSocket different from HTTP?
WebSocket allows continuous, two-way communication, whereas HTTP is stateless and request-response based.
When should I use WebSockets?
Use them for real-time applications like chat, live notifications, or gaming.
Does WebSocket use TCP?
Yes, WebSocket runs over a single TCP connection.
📚 출처
1. WebSocket