Beispiel #1
0
        public SOEServer(int port, string protocol = "SOE")
        {
            // Log
            Log("Initiating server on port: {0}", port);

            // UDP Listener
            UdpClient = new UdpClient(port);
            Port      = port;

            // Server components
            ConnectionManager = new SOEConnectionManager(this);
            Protocol          = new SOEProtocol(this, protocol);

            IncomingPackets  = new ConcurrentQueue <SOEPendingPacket>();
            IncomingMessages = new ConcurrentQueue <SOEPendingMessage>();

            // Initialize our message handlers
            Log("Initializing message handlers");
            MessageHandlers.Initialize();
            Log("Initiated server");
        }
Beispiel #2
0
        public SOEServer(int port, string protocol="SOE")
        {
            // Log
            Log("Initiating server on port: {0}", port);

            // UDP Listener
            UdpClient = new UdpClient(port);
            Port = port;

            // Server components
            ConnectionManager = new SOEConnectionManager(this);
            Protocol = new SOEProtocol(this, protocol);

            IncomingPackets = new ConcurrentQueue<SOEPendingPacket>();
            IncomingMessages = new ConcurrentQueue<SOEPendingMessage>();

            // Initialize our message handlers
            Log("Initializing message handlers");
            MessageHandlers.Initialize();
            Log("Initiated server");
        }