using System;

namespace SocketSrv
{
    public class WebSocketServerTest : IDisposable
    {
        private WebSocketServer WSServer;

        public WebSocketServerTest()
        {
            //使用默认的设置
            WSServer = new WebSocketServer();
        }

        public void Dispose()
        {
            Close();
        }

        private void Close()
        {
            WSServer.Dispose();
            GC.SuppressFinalize(this);
        }

        ~WebSocketServerTest()
        {
            Close();
        }

        public void Start()
        {
            WSServer.StartServer();
        }
    }
}