-
Notifications
You must be signed in to change notification settings - Fork 132
Description
The current implementations of gen_udp and gen_tcp use platform-specific drivers, which leads to maintenance overhead for our small team of volunteers.
Like the OTP team, it might be desirable to leverage the OTP socket interface to implement these interfaces, which would allow to effectively use a single driver (or at least a single codebase) for these common OTP interfaces.
Some perf measurements, particularly on ESP32, might be warranted, as the ESP32 driver makes direct use of lwip, instead of the BSD socket layer. It’s rumored that the BSD socket layer adds an additional buffer copy, which could lead to a memory and performance penalty on that platform.
OTOH, using the socket interface could also allow us to implement TLS in a more simple way.
Some additional APIs may be needed, e.g., for DNS resolution, which is not currently implemented for the OTP socket layer.