public void ReadCallback(IAsyncResult ar) { Socket handler = (Socket)ar.AsyncState; if (!this.IsAlive()) { return; } //decode packet BigEndianReader reader = new BigEndianReader(this.Buffer); //check in my frame FrameManager.Dispatch(this, this.Buffer); if (this.IsAlive()) { this.Socket.BeginReceive(this.Buffer, 0, this.Buffer.Length, 0, new AsyncCallback(ReadCallback), this.Socket); } }