示例#1
0
        void OnReceive(byte[] buffer, int size, IPEndPoint remotePoint)
        {
            FSPData_CS data = PBSerializer.Deserialize<FSPData_CS>(buffer);

            FSPSession session = GetSession(data.sid);
            if (session == null)
            {
                Debuger.LogWarning(LOG_TAG_RECV, "DoReceive() 收到一个未知的SID = " + data.sid);
                return;
            }

            session.EndPoint = remotePoint;
            session.Receive(data);
        }