Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketIDをイベントとして取得できるようになったことを追記 #58

Merged
merged 19 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/integration/p2p.webrtc.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ classDiagram
+OnStarted IObservable
+OnConnectFailed IObservable
+OnDisconnected IObservable
+OnUserConnected IObservable
+OnUserDisconnected IObservable
+IsRunning bool
+StartHostAsync(name) void
+ListHostsAsync() List
Expand Down Expand Up @@ -93,6 +95,7 @@ classDiagram
+listHosts(handle) void
+startClientAsync(hostId) void
+stop() void
+getSocketId() string
}
```

Expand Down Expand Up @@ -256,7 +259,7 @@ PeerClientは次のイベント通知を設けています。
- ホストから"done"を受信
- ホストとのIceConnectionStateがConnectedまたはCompletedになる
- タイプ:IObservable
- パラメータ:なし
- パラメータ:ユーザー自身のクライアントID
- OnStartFailed
- タイミング:ホストまたはクライアントが開始失敗した直後
- 開始処理がタイムアウトした場合に開始失敗と判断します。
Expand All @@ -271,6 +274,15 @@ PeerClientは次のイベント通知を設けています。
- タイミング:シグナリングサーバに接続中のホストまたはクライアントが切断された直後
- タイプ:IObservable
- パラメータ:切断された理由
- OnUserConnecting
- タイミング:他のユーザーと接続する直前
- 接続するユーザー同士がお互いにイベントを受け取ります。そのため新たに接続するユーザーは、既に接続している全てのユーザー数のイベントを受け取ります。
- タイプ:IObservable
- パラメータ:接続するユーザーのクライアントID
- OnUserDisconnecting
- タイミング:他のユーザーと切断する直前
- タイプ:IObservable
- パラメータ:切断するユーザーのクライアントID

### Native(C#)のP2Pにアプリケーション固有の処理を追加する

Expand Down
3 changes: 2 additions & 1 deletion docs/release/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ sidebar_position: 1
- [WebRTC](https://docs.unity3d.com/Packages/com.unity.webrtc@3.0/manual/index.html) 3.0.0-pre.6 ([BSD](https://docs.unity3d.com/Packages/com.unity.webrtc@3.0/license/Third%20Party%20Notices.html))

## Changes
### Extreal.Integration.Web.Common
### Extreal.Integration.P2P.WebRTC
#### Changed
- PeerConnectionのCreate/Closeでエラーが発生しても処理を継続するように変更しました。([Doc](../integration/p2p.webrtc.md), [PR](https://github.com/extreal-dev/Extreal.Integration.P2P.WebRTC/pull/9))
- P2Pの各クライアントを識別できるように、自身及び接続または切断したクライアントのIDを取得できるように変更しました。([Doc](../integration/p2p.webrtc.md), [PR](https://github.com/extreal-dev/Extreal.Integration.P2P.WebRTC/pull/10))

## Upgrade guide {#upgrade-guide}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ classDiagram
+OnStarted IObservable
+OnConnectFailed IObservable
+OnDisconnected IObservable
+OnUserConnected IObservable
+OnUserDisconnected IObservable
+IsRunning bool
+StartHostAsync(name) void
+ListHostsAsync() List
+StartClientAsync(hostId) void
+Stop() void
+getSocketId() string
}

class PeerConfig {
Expand Down Expand Up @@ -248,29 +251,38 @@ peerClient.Stop();
PeerClient has the following event notifications

- OnStarted
- Timing: Immediately after the host or client starts
- Host
- Immediately after the host is created
- Client
- Immediately after all of the following conditions are met
- Receives "done" from the host
- IceConnectionState becomes Connected or Completed
- Type: IObservable
- Parameters: None
- Timing: Immediately after the host or client starts
- Host
- Immediately after the host is created
- Client
- Immediately after all of the following conditions are met
- Receives "done" from the host
- IceConnectionState becomes Connected or Completed
- Type: IObservable
- Parameters: User's own Client ID
- OnStartFailed
- Timing: Immediately after host or client failed to start
- If the start processing times out, the start is assumed to have failed.
- The default timeout is 15 seconds. The timeout can be changed using PeerConfig.
- Type: IObservable
- Parameters: None
- Timing: Immediately after host or client failed to start
- If the start processing times out, the start is assumed to have failed.
- The default timeout is 15 seconds. The timeout can be changed using PeerConfig.
- Type: IObservable
- Parameters: None
- OnConnectFailed
- Timing: Immediately after the host or client has failed to connect to the signaling server
- Type: IObservable
- Parameters: Reason for connection failure
- Timing: Immediately after the host or client has failed to connect to the signaling server
- Type: IObservable
- Parameters: Reason for connection failure
- OnDisconnected
- Timing: Immediately after a host or client connected to the signaling server is disconnected
- Type: IObservable
- Parameters: Reason for disconnection
- Timing: Immediately after a host or client connected to the signaling server is disconnected
- Type: IObservable
- Parameters: Reason for disconnection
- OnUserConnecting
- Timing: Immediately before another user connects
- Connected users receive events from each other. Therefore, newly connected users will receive as many events as all users already connected.
- Type: IObservable
- Parameters: Client ID of the user to connect
- OnUserDisconnecting
- Timing: Immediately before another user disconnects
- Type: IObservable
- Parameters: Client ID of the user to disconnect

### Add application-specific processing to Native(C#) P2P

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ The following Unity versions have been tested.
- [WebRTC](https://docs.unity3d.com/Packages/com.unity.webrtc@3.0/manual/index.html) 3.0.0-pre.6 ([BSD](https://docs.unity3d.com/Packages/com.unity.webrtc@3.0/license/Third%20Party%20Notices.html))

## Changes
### Extreal.Integration.Web.Common
### Extreal.Integration.P2P.WebRTC
#### Changed
- Changed to continue processing even if errors occur in Create/Close of PeerConnection. ([Doc](../integration/p2p.webrtc.md), [PR](https://github.com/extreal-dev/Extreal.Integration.P2P.WebRTC/pull/9))
- Changed so that the ID of your own client and connected or disconnected clients can be obtained, so that each P2P client can be identified. ([Doc](../integration/p2p.webrtc.md), [PR](https://github.com/extreal-dev/Extreal.Integration.P2P.WebRTC/pull/10))

## Upgrade guide {#upgrade-guide}

Expand Down
Loading