[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[savannah-help-public] about lwip
From: |
Patrice GERBET |
Subject: |
[savannah-help-public] about lwip |
Date: |
Mon, 21 Sep 2015 15:39:43 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
Hello,
i have a stupid problem,
i have write a udp serveur software for linux,
i want port my project to stm 32 with liwp,
but stupide problem.
can you say how i can convert udp buffer receive to sring ?
best regards
patrice
my code source test
void udp_echoserver_receive_callback(void *arg, struct udp_pcb *upcb,
struct pbuf *p, struct ip_addr *addr, u16_t port)
{
/* Connect to the remote client */
udp_connect(upcb, addr, UDP_CLIENT_PORT);
/* Tell the client that we have accepted it */
// udp_send(upcb, p);
LCD_DisplayStringLine(Line6, (uint8_t*)"Renvoi UDP OK");
udp_send(upcb, p);
memcpy (p->payload, udpmsg, sizeof(udpmsg)); //copy d'un message
dans buffer d'envoi
/* refernce the string */
udp_send(upcb, p);
LCD_DisplayStringLine(Line7, (uint8_t*) p);
/* free the UDP connection, so we can accept new clients */
udp_disconnect(upcb);
/* Free the p buffer */
pbuf_free(p);
}
--
Patrice GERBET
Email : address@hidden
- [savannah-help-public] about lwip,
Patrice GERBET <=