Mongoose - C - C++

Warnings

  • Since Mongoose's core is not protected against concurrent accesses, make sure that all mg_* API functions are called from the same thread or RTOS task.

Mongoose Basics

Two Basic Data Structures:

  • struct mg_mgr # An event manager that holds all active connections
  • struct mg_connection # A single connection descriptor

Send and Receive Buffers

  • struct mg_connection::send # Data to be sent to a peer
  • struct mg_connection::recv # Data received from a peer