How do I create a simple client socket with lwip on a FRDM-K64?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How do I create a simple client socket with lwip on a FRDM-K64?

1,003 次查看
m4l490n
Contributor V

I'm trying to create a simple client socket in my FRDM-K64F board but these are the only examples I can import:

pastedImage_1.png

The nearest I can find to a client is the lwip_mqtt example that mentions that this is an MQTT client. But I'm having a hard time stripping all the MQTT code from it and converting that example into a simple client socket application.

Does anyone have an example of a simple client socket with lwip? Or can anyone please point me in the right direction where to find this information?

0 项奖励
1 回复

913 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Manuel:

Please refer to LwIP API to create a new TCP connection,

 netconn_new

For example,

            struct netconn *netconn;
            netconn = netconn_new(NETCONN_TCP);

Regards

Daniel

0 项奖励