All communication between MongoDB clients and servers are through discrete packets. Most packet types can be sent by the client to the server, one (REPLY) by the server to the client, and one (MSG) can be sent from either side.
For full details, consult the MongoDB documentation.
The following packet types can be sent by MongoDB clients. Note that, as of MongoDB 4.2, most commands are sent using a MSG packet, but the other types are still supported.