     }
 }
 
+private extension URLRequest {
+    mutating func applyDefaultMessageSocketSetting() {
+        headers = [
+            commonUserAgentKey: commonUserAgentValue,
+            "Sec-WebSocket-Extensions": "permessage-deflate; client_max_window_bits",
+            "Sec-WebSocket-Protocol": "msg.nicovideo.jp#json"
+        ]
+        timeoutInterval = 10
+    }
+}
+
 // MARK: - Private Methods (Message Socket, TimeShifted)
 private extension NicoManager {
     func openTimeShiftMessageSocket(userId: String, room: WebSocketRoomData, connectContext: NicoConnectContext, completion: @escaping (Result<Void, NicoError>) -> Void) {

        messageSocket = socket
    }

    func resetGoBack() {
        earliestChatDate = .distantFuture
        chatGoBackCount = 0
        chatCountInThreadRequest = 0
        goBackChats.removeAll()
    }

    // swiftlint:disable function_parameter_count function_body_length
    func handleMessageSocketEventForTimeShift(socket: WebSocket, event: WebSocketEvent, userId: String, threadId: String, threadKey: String, completion: (Result<Void, NicoError>) -> Void) {
        log.debug(event)
        switch event {
        case .connected:
            completion(Result.success(()))

            let result = processMessageSocketTimeShiftTextEvent(text: text)
            switch result {
            case .pingContentStart:
                timeShiftChatCountIn1ThreadRequest = 0
            case .chat(let chat):
                earliestTimeShiftChatDate = min(earliestTimeShiftChatDate, chat.date)
                timeShiftChats.append(chat)
                timeShiftChatCountIn1ThreadRequest += 1
            case .pingContentFinish:
                let receivedAnyChats = timeShiftChatCountIn1ThreadRequest > 0
                if receivedAnyChats {
                    delegate?.nicoManagerReceivingTimeShiftChats(
                        self, totalChatCount: timeShiftChats.count)
                }
                let receivedAllChats = timeShiftChatCountIn1ThreadRequest == 0
                let tooManyRequest = 1000 < timeShiftThreadRequestCount
                if receivedAllChats || tooManyRequest {
                    delegate?.nicoManagerDidReceiveTimeShiftChats(
                        self, totalChatCount: timeShiftChats.count)
                    timeShiftChats.sort(by: { a, b in a.date < b.date })
                    timeShiftChats.forEach {
                        delegate?.nicoManagerDidReceiveChat(self, chat: $0)
                    }
                    disconnect()
