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 10 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
13 changes: 12 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
- パラメータ:なし
- パラメータ:自分のSocketID
- OnStartFailed
- タイミング:ホストまたはクライアントが開始失敗した直後
- 開始処理がタイムアウトした場合に開始失敗と判断します。
Expand All @@ -271,6 +274,14 @@ PeerClientは次のイベント通知を設けています。
- タイミング:シグナリングサーバに接続中のホストまたはクライアントが切断された直後
- タイプ:IObservable
- パラメータ:切断された理由
- OnUserConnected
- タイミング:他のユーザと接続した直後
- タイプ:IObservable
- パラメータ:接続したユーザのSocketID
- OnUserDisconnected
- タイミング:他のユーザが切断した直後
- タイプ:IObservable
- パラメータ:切断したユーザのSocketID

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

Expand Down
5 changes: 3 additions & 2 deletions docs/release/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ 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通信時にSocketIDをイベントとして取得できるように変更しました。([Doc](../integration/p2p.webrtc.md), [PR](https://github.com/extreal-dev/Extreal.Integration.P2P.WebRTC/pull/10))

## Upgrade guide {#upgrade-guide}

モジュールバージョンを更新してください。
モジュールバージョンを更新してください。
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,37 @@ 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: My SocketID
- 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
- OnUserConnected
- Timing:Immediately after connecting with another user
- Type:IObservable
- Parameters:SocketID of the connected user
- OnUserDisconnected
- Timing:Immediately after another user disconnects
- Type:IObservable
- Parameters:SocketID of the disconnected user

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ 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 SocketID can be obtained as an event at P2P communication. ([Doc](../integration/p2p.webrtc.md), [PR](https://github.com/extreal-dev/Extreal.Integration.P2P.WebRTC/pull/10))

## Upgrade guide {#upgrade-guide}

Please update the module versions.
Please update the module versions.
Loading