Skip to content

Implement gen_tcp and gen_udp using the OTP socket interface #893

@fadushin

Description

@fadushin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions