-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Started upgrading websocket protocol * Got socket naming working. Also some responsive improvements. * Fixed non-lazy messages and added responsive connection state tracking. * Messaging and metrics * Finished up message UI and fixed issues with client state.
- Loading branch information
Showing
44 changed files
with
1,110 additions
and
187 deletions.
There are no files selected for viewing
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
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 was deleted.
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,21 @@ | ||
using System.Collections.Generic; | ||
using MessagePack; | ||
|
||
namespace Retro.Net.Api.RealTime.Models | ||
{ | ||
/// <summary> | ||
/// An error message. | ||
/// </summary> | ||
[MessagePackObject] | ||
public class ErrorMessage | ||
{ | ||
/// <summary> | ||
/// Gets or sets the reason. | ||
/// </summary> | ||
/// <value> | ||
/// The reason. | ||
/// </value> | ||
[Key("reasons")] | ||
public ICollection<string> Reasons { get; set; } | ||
} | ||
} |
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,41 @@ | ||
using System; | ||
using System.Collections.Concurrent; | ||
using System.Collections.Generic; | ||
|
||
namespace Retro.Net.Api.RealTime.Models | ||
{ | ||
internal class GameBoyClientContext | ||
{ | ||
/// <summary> | ||
/// Gets or sets the identifier. | ||
/// </summary> | ||
/// <value> | ||
/// The identifier. | ||
/// </value> | ||
public Guid Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the socket. | ||
/// </summary> | ||
/// <value> | ||
/// The socket. | ||
/// </value> | ||
public LockingWebSocket Socket { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the state. | ||
/// </summary> | ||
/// <value> | ||
/// The state. | ||
/// </value> | ||
public GameBoySocketClientState State { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the message queue. | ||
/// </summary> | ||
/// <value> | ||
/// The message queue. | ||
/// </value> | ||
public ConcurrentQueue<ICollection<GameBoyClientMessage>> MessageQueue { get; set; } | ||
} | ||
} |
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,38 @@ | ||
using MessagePack; | ||
|
||
namespace Retro.Net.Api.RealTime.Models | ||
{ | ||
/// <summary> | ||
/// A message to a client GameBoy. | ||
/// </summary> | ||
[MessagePackObject] | ||
public class GameBoyClientMessage | ||
{ | ||
/// <summary> | ||
/// Gets or sets the user associated with this message. | ||
/// </summary> | ||
/// <value> | ||
/// The user associated with this message. | ||
/// </value> | ||
[Key("user")] | ||
public string User { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the date. | ||
/// </summary> | ||
/// <value> | ||
/// The date. | ||
/// </value> | ||
[Key("date")] | ||
public string Date { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the message. | ||
/// </summary> | ||
/// <value> | ||
/// The message. | ||
/// </value> | ||
[Key("message")] | ||
public string Message { get; set; } | ||
} | ||
} |
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,40 @@ | ||
using System.Collections.Generic; | ||
using GameBoy.Net.Graphics; | ||
using MessagePack; | ||
|
||
namespace Retro.Net.Api.RealTime.Models | ||
{ | ||
/// <summary> | ||
/// Metrics for a GameBoy socket client. | ||
/// </summary> | ||
[MessagePackObject] | ||
public class GameBoyMetrics | ||
{ | ||
/// <summary> | ||
/// Gets or sets the frames per second. | ||
/// </summary> | ||
/// <value> | ||
/// The frames per second. | ||
/// </value> | ||
[Key("framesPerSecond")] | ||
public int FramesPerSecond { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the skipped frames. | ||
/// </summary> | ||
/// <value> | ||
/// The skipped frames. | ||
/// </value> | ||
[Key("skippedFrames")] | ||
public int SkippedFrames { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the messages. | ||
/// </summary> | ||
/// <value> | ||
/// The messages. | ||
/// </value> | ||
[Key("messages")] | ||
public ICollection<GameBoyClientMessage> Messages { get; set; } | ||
} | ||
} |
Oops, something went wrong.