From 기획

로그인 폼을 통해 유저 ID와 접속할 방 번호가 전달된다.

/login

서버 저장소는 로컬 스토리지를 활용하여, 각 방 번호에 대해 접속 중인 사용자를 관리한다.

아이디가 중복되지 않았다면 해당 번호의 방으로 redirect한다.

/room/<room_id>

Error

<aside> 💡 Endpoints MAY use the following pre-defined status codes when sending a Close frame.

</aside>

RFC 6455: The WebSocket Protocol

코드 요약 내용
1000 a normal closure the purpose for which the connection was established has been fulfilled
1001 an endpoint is "going away" such as a server going down
or a browser having navigated away from a page
1002 connection terminated:
protocol error an endpoint is terminating the connection due to a protocol error
1003 connection terminated:
unacceptable data type an endpoint is terminating the connection because it has received a type of data it cannot accept
(e.g., an endpoint that understands only text data MAY send this if it receives a binary message)
1004 - (Reserved) -
1005 - (Reserved) -
1006 - (Reserved) -
1007 connection terminated:
inconsistent data type an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message
(e.g., non-UTF-8 [RFC3629] data within a text message).
1008 generic status code
for policy violation an endpoint is terminating the connection because it has received a message that violates its policy. This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy.
1009 connection terminated:
message too long an endpoint is terminating the connection because it has received a message that is too big for it to process.
1010 no extension negotiated an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.

The list of extensions that are needed SHOULD appear in the /reason/ part of the Close frame. Note that this status code is NOT used by the server, because it can fail the WebSocket handshake instead. | | 1011 | | a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. | | 1015 | - (Reserved) | - |