Esempio n. 1
0
        protected virtual void OnReceived(MalockSocketStream e)
        {
            EventHandler <MalockSocketStream> evt = this.Received;

            if (evt != null)
            {
                evt(this, e);
            }
        }
Esempio n. 2
0
        private void ProcessReceived(object sender, MalockSocketStream e)
        {
            MalockNodeMessage message = null;

            using (Stream stream = e.Stream)
            {
                MalockNodeMessage.TryDeserialize(stream, out message);
            }
            if (message != null)
            {
                this.ProcessMessage(e.Socket, message);
            }
        }