﻿using System;
using Dissonance.Networking;

namespace Dissonance.Integrations.DarkRift2
{
    /// <summary>
    /// We don't really need a server here (DarkRift server doesn't run inside Unity). We just need something to satisfy the `TServer` generic parameter on `BaseClient`
    /// </summary>
    public class DarkRift2Server
        : BaseServer<DarkRift2Server, DarkRift2Client, DarkRift2Peer>
    {
        public DarkRift2Server(DarkRift2CommsNetwork comms)
        {
            throw new NotSupportedException("Cannot instantiate DarkRift2 server in Unity");
        }

        protected override void SendReliable(DarkRift2Peer connection, ArraySegment<byte> packet)
        {
            throw new NotSupportedException("Cannot instantiate DarkRift2 server in Unity");
        }

        protected override void ReadMessages()
        {
            throw new NotSupportedException("Cannot instantiate DarkRift2 server in Unity");
        }

        protected override void SendUnreliable(DarkRift2Peer connection, ArraySegment<byte> packet)
        {
            throw new NotSupportedException("Cannot instantiate DarkRift2 server in Unity");
        }
    }
}
