LWIP
Hi,
how can I check if my client in connected to pc server?
--------------------------
/* init code for LWIP */
MX_LWIP_Init();
/* USER CODE BEGIN 5 */
LOCK_TCPIP_CORE();
tcp_setup();
UNLOCK_TCPIP_CORE();
---------------------------
void tcp_setup(void)
{
uint32_t data = 0xdeadbeef;
/* create an ip */
ip4_addr_t ip;
IP4_ADDR(&ip,192,168,1,4); //IP of my PHP server
/* create the control block */
testpcb = tcp_new(); //testpcb is a global struct tcp_pcb
// as defined by lwIP
/* dummy data to pass to callbacks*/
tcp_arg(testpcb, &data);
/* register callbacks with the pcb */
// tcp_recv(testpcb, tcpRecvCallback);
tcp_sent(testpcb, tcpSendCallback);
tcp_err(testpcb, tcpErrorHandler);
/* now connect */
tcp_connect(testpcb, &ip, 8888, connectCallback);
}
---------------------------
this snippet run and is OK.
How can I check if the client is alwais connected to pc server?
Can anyone help me?
Thank you in advance.
