Can now somewhat reliably join a party
This commit is contained in:
@ -8,7 +8,7 @@ namespace Aurora.Services
|
||||
public class ServerService : BaseService<ServerService>
|
||||
{
|
||||
private string _hostname = "127.0.0.1";
|
||||
private int _port = 50001;
|
||||
private int _port = SettingsService.Instance.DefaultPort;
|
||||
private Grpc.Core.Server _server;
|
||||
|
||||
/// <summary>
|
||||
@ -28,9 +28,8 @@ namespace Aurora.Services
|
||||
get { return _hostname; }
|
||||
}
|
||||
|
||||
public void Initialize(string hostname, int port)
|
||||
public void Initialize(string hostname)
|
||||
{
|
||||
this._port = port;
|
||||
this._hostname = hostname;
|
||||
_server = new Grpc.Core.Server
|
||||
{
|
||||
|
@ -8,6 +8,8 @@ namespace Aurora.Services
|
||||
public class SettingsService : BaseService<SettingsService>
|
||||
{
|
||||
private Lazy<ISettings> _appSettings;
|
||||
private string _usernameKey = "username";
|
||||
private string _defaultPortKey = "port";
|
||||
|
||||
public SettingsService()
|
||||
{
|
||||
@ -30,8 +32,6 @@ namespace Aurora.Services
|
||||
}
|
||||
}
|
||||
|
||||
private string _usernameKey = "username";
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return AppSettings.GetValueOrDefault(_usernameKey, ""); }
|
||||
@ -40,5 +40,12 @@ namespace Aurora.Services
|
||||
AppSettings.AddOrUpdateValue(_usernameKey, value);
|
||||
}
|
||||
}
|
||||
|
||||
public int DefaultPort
|
||||
{
|
||||
get { return AppSettings.GetValueOrDefault(_defaultPortKey, 4005); }
|
||||
set { AppSettings.AddOrUpdateValue(_defaultPortKey, value); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user