[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] listen to multiple ports
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] listen to multiple ports |
Date: |
Tue, 1 Oct 2019 08:54:56 +0200 |
steffen_storck wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> I'm sorry, but maybe case is a little exotic.
No, it's not ;-)
>
> I need to listen to more than one port but only have one local interface. So
> I tried to add more pcbs to the list of pcbs with this
>
> struct udp_pcb* upcb = udp_new();
> if (upcb)
> {
> udp_bind(upcb, IP_ADDR_ANY, ports[i]);
> udp_recv(upcb, udp_server_receive_callback, pInst);
> }
>
>
> But after 4 pcbs, the memory allocation fails. How/where can I increase the
> size so that 8 pcbs cann be allocated?
Look at MEMP_NUM_*** in opt.h. But don't change opt.h: create your own
lwipopts.h instead, overriding the default settings.
Regards,
Simon