Exemple #1
0
        public SOEClient(SOEConnectionManager manager, IPEndPoint client)
        {
            // Manager and server
            Server = manager.Server;
            Manager = manager;
            Client = client;
            DataChannel = new SOEDataChannel(this);

            // Session
            SessionStarted = false;
            Encryptable = false;
            Compressable = true;

            Encrypted = false;

            // This client is new
            Interact();
        }
Exemple #2
0
        public SOEClient(SOEConnectionManager manager, IPEndPoint client)
        {
            // Manager and server
            Server      = manager.Server;
            Manager     = manager;
            Client      = client;
            DataChannel = new SOEDataChannel(this);

            // Session
            SessionStarted = false;
            Encryptable    = false;
            Compressable   = true;

            Encrypted = false;

            // This client is new
            Interact();
        }
Exemple #3
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");
        }
Exemple #4
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");
        }