Lwip webserver and tcp client at same time is posibble ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Lwip webserver and tcp client at same time is posibble ?

1,665件の閲覧回数
ramazan_kurban3
Contributor III

Hi. I want to use lpcopen webserver app and tcpecho client app on LPC1769 board at the same time namely LPC1769 will act as both server and client.Is it posibble ? How can ı do ?

タグ(4)
0 件の賞賛
返信
2 返答(返信)

1,483件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

I would suggest you start with the demo lwip_httpsrv. Then add your tcp echo client code.

Please refer to lwip_httpsrv_freertos.c

/*!
 * @brief The main function containing server thread.
 */
static void main_thread(void *arg)
{
    LWIP_UNUSED_ARG(arg);

    stack_init();
    http_server_socket_init();

    vTaskDelete(NULL);
}

stack_init initialized the lwip stack; 

http_server_socket_init initialized the web server.

Then you can add your echo client function ( for example, tcpecho_client_init) from there.

Regards

Daniel

1,483件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Ramazan:

The device can act as both server and client. Because they running on different sockets.

Regards

Daniel

0 件の賞賛
返信