-
-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #835 from Cysharp/feature/MoveToInternal
Move internal classes under Internal namespace
- Loading branch information
Showing
15 changed files
with
131 additions
and
90 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...gicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/ClientHeartbeatEvent.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
namespace MagicOnion.Client | ||
{ | ||
/// <summary> | ||
/// Represents a client heartbeat received event. | ||
/// </summary> | ||
public readonly struct ClientHeartbeatEvent | ||
{ | ||
/// <summary> | ||
/// Gets the round trip time (RTT) between client and server. | ||
/// </summary> | ||
public TimeSpan RoundTripTime { get; } | ||
|
||
public ClientHeartbeatEvent(long roundTripTimeMs) | ||
{ | ||
RoundTripTime = TimeSpan.FromMilliseconds(roundTripTimeMs); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/ClientHeartbeatEvent.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
2 changes: 1 addition & 1 deletion
2
...treamingHubClientHeartbeatManager.cs.meta → ...treamingHubClientHeartbeatManager.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
2 changes: 1 addition & 1 deletion
2
...nt/StreamingHubResponseTaskSource.cs.meta → ...al/StreamingHubResponseTaskSource.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...gicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/ServerHeartbeatEvent.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
|
||
namespace MagicOnion.Client | ||
{ | ||
/// <summary> | ||
/// Represents a server heartbeat received event. | ||
/// </summary> | ||
public readonly struct ServerHeartbeatEvent | ||
{ | ||
/// <summary> | ||
/// Gets the server time at when the heartbeat was sent. | ||
/// </summary> | ||
public DateTimeOffset ServerTime { get; } | ||
|
||
/// <summary> | ||
/// Gets the metadata data. The data is only available during event processing. | ||
/// </summary> | ||
public ReadOnlyMemory<byte> Metadata { get; } | ||
|
||
public ServerHeartbeatEvent(long serverTimeUnixMs, ReadOnlyMemory<byte> metadata) | ||
{ | ||
ServerTime = DateTimeOffset.FromUnixTimeMilliseconds(serverTimeUnixMs); | ||
Metadata = metadata; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/ServerHeartbeatEvent.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
namespace MagicOnion.Client | ||
{ | ||
/// <summary> | ||
/// Represents a client heartbeat received event. | ||
/// </summary> | ||
public readonly struct ClientHeartbeatEvent | ||
{ | ||
/// <summary> | ||
/// Gets the round trip time (RTT) between client and server. | ||
/// </summary> | ||
public TimeSpan RoundTripTime { get; } | ||
|
||
public ClientHeartbeatEvent(long roundTripTimeMs) | ||
{ | ||
RoundTripTime = TimeSpan.FromMilliseconds(roundTripTimeMs); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
|
||
namespace MagicOnion.Client | ||
{ | ||
/// <summary> | ||
/// Represents a server heartbeat received event. | ||
/// </summary> | ||
public readonly struct ServerHeartbeatEvent | ||
{ | ||
/// <summary> | ||
/// Gets the server time at when the heartbeat was sent. | ||
/// </summary> | ||
public DateTimeOffset ServerTime { get; } | ||
|
||
/// <summary> | ||
/// Gets the metadata data. The data is only available during event processing. | ||
/// </summary> | ||
public ReadOnlyMemory<byte> Metadata { get; } | ||
|
||
public ServerHeartbeatEvent(long serverTimeUnixMs, ReadOnlyMemory<byte> metadata) | ||
{ | ||
ServerTime = DateTimeOffset.FromUnixTimeMilliseconds(serverTimeUnixMs); | ||
Metadata = metadata; | ||
} | ||
} | ||
} |
This file contains 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
1 change: 1 addition & 0 deletions
1
tests/MagicOnion.Client.Tests/StreamingHubClientHeartbeatManagerTest.cs
This file contains 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