cancel
Showing results for 
Search instead for 
Did you mean: 

Abstraction of the TCP/IP stack like NetxDuo or LWIP example

Zainulabedeen
Associate II

I was looking for a way to create a high level abstracted layer that can be agnostic to the lower layer TCP/IP stack, like NetxDuo or LWIP, running under the higher abstracted layer.

I have came across suggestion to implement a `plug-in` based implementation of the higher level abstracted layer.

 

Kindly suggest me your opinions, what could be the best way to implement such high level abstracted layer that can be agnostic to the lower level TCP/IP stack running ? Also if there is an example of someone doing something similar?

 

Thanks a lot. 

1 REPLY 1
MStackDev_376
Associate II

Hi,

Since you are looking for a high-level abstracted layer compatible with any lower layer TCP/IP, I would recommend you the Mongoose Networking Library.

Mongoose is a networking library ideal for embedded devices and it includes support for many networking protocols like HTTP, MQTT, Websockets and many more, with well documented APIs. At its core, it is the high-level abstraction library you are describing. It remains completely agnostic of any lower-layer TCP/IP implementation, having compatibility with numerous stacks (LwIP, NextDuo, any other stack that supports BSD sockets), also Mongoose comes with its own built-in lightweight stack as an alternative to the other stacks mentioned.

If you are looking to build your own layer, you can check at how Mongoose is implemented here. Or, if you would prefer to skip the implementation step, you can try and use Mongoose directly and see if it aligns with your goals. The library is well documented and it has lots of useful examples.

Heads up: I am part of the Mongoose development team, so I am very familiar with its design and features and I hope you find this helpful!