SOE.Core.SOEServer.SOEServer C# (CSharp) Method

SOEServer() public method

public SOEServer ( int port, string protocol = "SOE" ) : System
port int
protocol string
return System
        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");
        }