nexusforever/Source/NexusForever.AuthServer/Network/AuthSession.cs
kirmmin 97ecf42280 Core/RealmList: Reload servers and handle offline (#219)
* Core/RealmList: Reload servers and handle offline
Refreshes servers from database if the server list is deemed dirty

Converted to Asynchronous Database checks

Refactored to use Update

Moved Server ping to the ServerInfo model

Moved ServerManager to own thread

Fixes following singleton update

Fixes following review

* Small cleanup.
2019-12-06 23:18:55 +13:00

31 lines
811 B
C#

using System.Net.Sockets;
using NexusForever.AuthServer.Network.Message.Model;
using NexusForever.Shared.Network;
using NexusForever.Shared.Network.Message;
using NexusForever.Shared.Network.Message.Model;
namespace NexusForever.AuthServer.Network
{
public class AuthSession : GameSession
{
public override void OnAccept(Socket newSocket)
{
base.OnAccept(newSocket);
EnqueueMessage(new ServerHello
{
AuthVersion = 16042,
AuthMessage = 0x97998A0,
ConnectionType = 3
});
}
protected override IWritable BuildEncryptedMessage(byte[] data)
{
return new ServerAuthEncrypted
{
Data = data
};
}
}
}