socket ID returned from socket(AF_INET, ....) in ESP32 does not start at 0 #6804
Replies: 1 comment
-
Posted at 2017-12-14 by Wilberforce @jumjum The first socket does start at zero I would have thought. The inbuilt telnet server I would expect will be using the first socket. Posted at 2017-12-14 by Wilberforce The number of sockets is set in the espruino/EspruinoBuildTools@a2c57ff#diff-95855eaea0c4f55f2862ca738bed5fa9R243 esp32/build/app/sdkconfig
I'm not sure where the 32 you refer to comes from? Are you running out of sockets? Posted at 2017-12-14 by JumJum in libs/network/network.c, line 671 Posted at 2017-12-15 by @gfwilliams This check was in there because we used to keep track of which sockets had TLS with bits inside a 32 bit integer (using Posted at 2017-12-15 by JumJum @wilberforce, Posted at 2017-12-15 by Wilberforce Hi @jumjum The ask config are documented as part of the guild tools here: https://github.com/espruino/EspruinoBuildTools/blob/master/esp32/build/app/sdkconfig Posted at 2017-12-16 by JumJum Hello @wilberforce |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-12-14 by JumJum
On ESP32 call of socket(AF_INET,.....) returns a socket ID + an offset(named LWIP_SOCKET_OFFSET)
This results in an error message during check of socket against maxsize (32)
Is there any limitation inside Espruino for socket ID, except this assert, for range of sockets ?
With other words, is this socket ID used somewhere in Espruino, for example as a pointer to an array ?
Beta Was this translation helpful? Give feedback.
All reactions