예제 #1
0
        private void ProcessReceived(object sender, MalockSocketStream e)
        {
            MalockNnsMessage message = null;

            using (Stream stream = e.Stream)
            {
                MalockNnsMessage.TryDeserialize(stream, out message);
                if (message != null)
                {
                    this.ProcessMessage(e.Socket, message, stream);
                }
            }
        }
예제 #2
0
        protected override void OnReceived(object sender, MalockSocketStream e)
        {
            MalockNnsMessage message = null;

            using (Stream stream = e.Stream)
            {
                if (!MalockNnsMessage.TryDeserialize(e.Stream, out message))
                {
                    this.Abort();
                    return;
                }
                if (message.Command == MalockNnsMessage.SERVER_NNS_COMMAND_DUMPHOSTENTRYINFO)
                {
                    this.DumpHostEntry(stream);
                }
            }
        }