Beispiel #1
0
        public void Start()
        {
            Console.WriteLine("> Starting IWServerMatch on port {0}...", m_IWPort);

            IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
            EndPoint remote = (EndPoint)(sender);

            m_IWSocket.Bind(m_IWEndPoint);

            int len = m_IWSocket.ReceiveFrom(m_IWReceiveBuf, ref remote);

            m_IWReceiveBuf = Encoding.Default.GetBytes(remote.ToString());
            MemoryStream stream = new MemoryStream(m_IWReceiveBuf);
            BinaryReader reader = new BinaryReader(stream);

            IWHandleMatch handleMatch = new IWHandleMatch();
            handleMatch.HandlePacket(m_IWSocket, remote, len, reader);
        }
Beispiel #2
0
        public void Start()
        {
            Console.WriteLine("> Starting IWServerMatch on port {0}...", m_IWPort);

            IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
            EndPoint   remote = (EndPoint)(sender);

            m_IWSocket.Bind(m_IWEndPoint);

            int len = m_IWSocket.ReceiveFrom(m_IWReceiveBuf, ref remote);

            m_IWReceiveBuf = Encoding.Default.GetBytes(remote.ToString());
            MemoryStream stream = new MemoryStream(m_IWReceiveBuf);
            BinaryReader reader = new BinaryReader(stream);

            IWHandleMatch handleMatch = new IWHandleMatch();

            handleMatch.HandlePacket(m_IWSocket, remote, len, reader);
        }