Mongoose has no mg_create_server function?

2019-09-12 02:07发布

I'm following the Mongoose Embedding Guide and I get the error:

error: ‘mg_create_server’ was not declared in this scope
     struct mg_server *server = mg_create_server(NULL, NULL);

This is copied verbatim from the embedding guide.

Looking in mongoose.h, there is no mg_create_server anywhere to be found! Neither in that latest version, nor 5.1, nor 4.1 (from the google code archives).

What am I missing here?

1条回答
▲ chillily
2楼-- · 2019-09-12 02:22

mg_create_server apparently exists in version 5.6. Version 6.0 (the latest) has changed the API, and they didn't update their embedding guide. Here is an example of a RESTful server with the latest version of Mongoose. Here are the latest API docs.

查看更多
登录 后发表回答