reconnect

Hive 채팅 서버 재연결
Hive chat server reconnection


korean

Hive 채팅 기능을 호출한 후 연결이 네트워크 등의 사유로 끊겼을 경우, 재연결을 시도하는 API이다.
재연결은 기존 연결과 동일한 방식으로 작동하며, 연결이 끊어진 후 10분 이내에 호출되면, 이전에 참가한 채널에 자동으로 재접속을 시도한다.
재접속에 성공한 채널은 channelIds 로 반환되고, 접속에 실패한 채널은 failChannelIds 로 반환된다.

기본적으로 60초 이내에 재연결되지 않으면 ResultAPI.Code.ChatResponseError가 발생한다.
Configuration.chatConnectionTimeout API를 사용하여 재연결을 위한 최대 시간을 재설정할 수 있다.

재연결 상태를 감지하고 상태 변경 이벤트를 수신하려면 Chat.addConnectionListener 이벤트 리스너를 등록해야 한다.


english

This API attempts to reconnect to the Hive chat server when the connection is lost due to network issues or other reasons.
Reconnection works the same as the initial connection, and if called within 10 minutes after the connection is lost, it will automatically try to reconnect to the previously joined channels.
Channels successfully reconnected will be returned in channelIds, while channels that failed to reconnect will be returned in failChannelIds.

By default, if the reconnection is not established within 60 seconds, ResultAPI.Code.ChatResponseError will occur.
The maximum time for reconnection can be reconfigured using the Configuration.chatConnectionTimeout API.

To detect the reconnection status and receive status change events, you need to register the event listener with Chat.addConnectionListener.

Parameters