cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP STM32F4 allocate a single udp_pcb per connected device?

######
Senior

Sorry for asking an obvious question...

LWIP documentation describes a udp_pcb as "Creates a new UDP pcb which can be used for UDP communication."

https://lwip.fandom.com/wiki/Raw/UDP

When connecting to multiple devices with an IP address each using UDP protocol with LWIP, is it expected that you allocate a udp_pcb struct per connected device? Or try and re-use a single UDP protocol control block.

 

E.g. One Device connecting to 5 other devices:

therefore create five udp_pcb objects?

or 

re-use one udp_pcb but send to different IP addresses? 

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
STea
ST Employee

Hello @###### ,

I recommend that you use a udp_pcb per connection.
Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
STea
ST Employee

Hello @###### ,

I recommend that you use a udp_pcb per connection.
Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@STea

Thanks.