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); } } }
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); } } }