Configure the client port in esp_http_client request?
Configure the client port in esp_http_client request?
Is it possible to configure the client (source) port when initializing an esp_http_client? If not, what is the default client port? There is a port field in esp_http_client_config_t struct, but it defines the port to connect to (destination port).
Re: Configure the client port in esp_http_client request?
Sorry that esp_http_client not support set source port. The source port is a random value from 49152 to 65535.
Re: Configure the client port in esp_http_client request?
Is the source port changed on every esp_http_client_perform or it is set during the initialization of the client? Is there a way to get the source port somehow, so I can see which port exactly is being used?
Re: Configure the client port in esp_http_client request?
The source port is allocated in https://github.com/espressif/esp-lwip/b ... cp.c#L1124, not in esp_http_client component, it is in low layer lwip. It is difficult to get the source port in esp_http_client layer. Because you have no API to get socket fd.
Who is online
Users browsing this forum: Baidu [Spider] and 53 guests