Conversation
cfe95f0 to
5b776e2
Compare
5b776e2 to
dde0bdf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#️⃣ 연관된 이슈
📝 작업 내용
이해를 돕기 위해서 예제를 하나 만들어봤습니다. Reconnectable WebSocket이 궁금하시다면 참고해주세요!
Reconnectable WebSocket 정리한 노션 링크
웹소켓 클라이언트를 리팩토링 하면서 웹소켓 객체를 하나로 줄였습니다.
ReconnectableWebSocketClient,BaseWebSocketClient->
WebSocketClient웹소켓 상태를 Task에서 관찰하도록 구현했습니다. 상황에 따라서 알맞은 상태가 전달되고 그에 맞는 작업을 진행합니다.
재연결시에 다시 웹소켓에 메시지 보내기
재연결이 완료되면 웹소켓에 다시 메시지를 전달해야 하기 때문에
ViewModel쪽에서도 웹소켓의 상태를 관찰해야 합니다.하나의
AsyncStream에 두 개의 소비자가 있으면 데이터가 나눠서 전달되는 문제가 생기기 때문에 BroadCaster를 만들었습니다.아래 코드와 같이 웹소켓 상태가
connected가 될 때 다시 웹소켓에 메시지를 보내도록 반응형으로 구현했습니다.스크린샷 (선택)
2025-10-27.1.17.20.mov
💬 리뷰 요구사항(선택)
실기기로 테스트 부탁드립니다!
실기기와 Mac에 USB로 연결하면 네트워크를 끊어도 정상적인 테스트가 가능합니다.