# Poco::MongoDB

# class Message

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/Message.h

## Description

Base class for all messages send or retrieved from MongoDB server.

## Inheritance

Known Derived Classes: UpdateRequest, GetMoreRequest, InsertRequest, DeleteRequest, KillCursorsRequest, QueryRequest, RequestMessage, ResponseMessage

## Member Summary

Member Functions: header, messageLength

## Constructors

### Message

explicit Message(
MessageHeader::OpCode opcode
);

Creates a Message using the given OpCode.

## Destructor

### ~Message

virtual ~Message();

Destructor

## Member Functions

### header

MessageHeader & header();

Returns the message header

### messageLength

void messageLength(
Poco::Int32 length
);

Sets the message length in the message header

## Variables

### _header

MessageHeader _header;