CSMongo.Responses.ResponseBase._ReadResponse C# (CSharp) Method

_ReadResponse() private method

private _ReadResponse ( Stream response ) : void
response Stream
return void
        private void _ReadResponse(Stream response)
        {
            //perform any reading as required
            BinaryReader reader = new BinaryReader(response);

            //read the header first
            this.Length = reader.ReadInt32();
            this.RequestId = reader.ReadInt32();
            this.ResponseTo = reader.ReadInt32();
            this.OpCode = (OpCodeTypes)reader.ReadInt32();

            //next, call the reading for the body of the content
            this.ParseStream(response);
        }