Skip to content

Commit 54a18f8

Browse files
committed
rpcTransportClosed -> rpcDataChannelClosed に変更する
1 parent a8304ed commit 54a18f8

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- `rpcMethodNotAllowed(method: String)`
4747
- `rpcEncodingError(reason: String)`
4848
- `rpcDecodingError(reason: String)`
49-
- `rpcTransportClosed(reason: String)`
49+
- `rpcDataChannelClosed(reason: String)`
5050
- `rpcTimeout`
5151
- `rpcServerError(detail: RPCErrorDetail)`
5252
- @zztkm

Sora/MediaChannel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ public final class MediaChannel {
162162
/// - Returns: 利用可能な RPC メソッドの一覧。RPC が初期化されていない場合は空配列を返します
163163
///
164164
/// # 使用例
165+
///
165166
/// ```swift
166167
/// if mediaChannel.rpcMethods.contains(.requestSimulcastRid) {
167168
/// let result = try await mediaChannel.rpc(

Sora/PeerChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
10911091

10921092
if let rpcChannel {
10931093
rpcChannel.invalidate(
1094-
reason: SoraError.rpcTransportClosed(reason: reason.description))
1094+
reason: SoraError.rpcDataChannelClosed(reason: reason.description))
10951095
self.rpcChannel = nil
10961096
}
10971097

Sora/RPC.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ public final class RPCChannel {
165165
if let identifier {
166166
finishPending(
167167
id: identifier,
168-
result: .failure(SoraError.rpcTransportClosed(reason: "failed to send rpc message")))
168+
result: .failure(SoraError.rpcDataChannelClosed(reason: "failed to send rpc message")))
169169
} else {
170-
completion?(.failure(SoraError.rpcTransportClosed(reason: "failed to send rpc message")))
170+
completion?(.failure(SoraError.rpcDataChannelClosed(reason: "failed to send rpc message")))
171171
}
172172
return false
173173
}

Sora/SoraError.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public enum SoraError: Error {
5252
case rpcDecodingError(reason: String)
5353

5454
/// RPC の送受信に利用する DataChannel が切断された
55-
case rpcTransportClosed(reason: String)
55+
case rpcDataChannelClosed(reason: String)
5656

5757
/// RPC の応答がタイムアウトした
5858
case rpcTimeout
@@ -107,8 +107,8 @@ extension SoraError: LocalizedError {
107107
return "RPC encoding error: \(reason)"
108108
case .rpcDecodingError(let reason):
109109
return "RPC decoding error: \(reason)"
110-
case .rpcTransportClosed(let reason):
111-
return "RPC transport is closed: \(reason)"
110+
case .rpcDataChannelClosed(let reason):
111+
return "RPC DataChannel is closed: \(reason)"
112112
case .rpcTimeout:
113113
return "RPC response timeout"
114114
case .rpcServerError(let detail):

0 commit comments

Comments
 (0)