Clean up nullability in comm API

This commit is contained in:
YoshiRulz 2021-08-03 01:51:13 +10:00
parent 97222f2c5b
commit fe05442ab0
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 5 additions and 5 deletions

View File

@ -6,15 +6,15 @@ namespace BizHawk.Client.Common
{
private static readonly WebSocketServer _wsServer = new WebSocketServer();
private readonly (HttpCommunication HTTP, MemoryMappedFiles MMF, SocketServer Sockets) _networkingHelpers;
private readonly (HttpCommunication? HTTP, MemoryMappedFiles MMF, SocketServer? Sockets) _networkingHelpers;
public HttpCommunication? HTTP => _networkingHelpers.HTTP;
public MemoryMappedFiles? MMF => _networkingHelpers.MMF;
public MemoryMappedFiles MMF => _networkingHelpers.MMF;
public SocketServer? Sockets => _networkingHelpers.Sockets;
public WebSocketServer? WebSockets => _wsServer;
public WebSocketServer WebSockets => _wsServer;
public CommApi(IMainFormForApi mainForm) => _networkingHelpers = mainForm.NetworkingHelpers;

View File

@ -6,12 +6,12 @@ namespace BizHawk.Client.Common
{
HttpCommunication? HTTP { get; }
MemoryMappedFiles? MMF { get; }
MemoryMappedFiles MMF { get; }
SocketServer? Sockets { get; }
#if ENABLE_WEBSOCKETS
WebSocketServer? WebSockets { get; }
WebSocketServer WebSockets { get; }
#endif
string? HttpTest();