Loading...
Searching...
No Matches
mongo_packet_header Struct Reference
Mongo Wire Protocol » Packets

Mongo packet header. More...

`#include <mongo-wire.h>`

## Data Fields

gint32 | length
| Full length of the packet, including the header.
gint32 | id
| Sequence ID, used when MongoDB responds to a command.
gint32 | resp_to
| ID the response is an answer to.
gint32 | opcode
| The opcode of the command.

## Detailed Description

Mongo packet header.

Every mongo packet has a header like this. Normally, one does not need to touch it, though.

## Field Documentation

## opcode

gint32 mongo_packet_header::opcode

The opcode of the command.

See also
  mongo_wire_opcode. <

## resp_to

gint32 mongo_packet_header::resp_to

ID the response is an answer to.

Only sent by the MongoDB server, never set on client-side.