Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preliminary support for the OTP socket interface #757

Merged
merged 1 commit into from
Oct 22, 2023

Commits on Oct 17, 2023

  1. Add preliminary support for the OTP socket interface

    This PR adds preliminary support for the OTP socket interface, which exposes APIs for low-level socket operations, as defined in OTP 22 and later. This implementation aims to be API-compatible with the OTP implementation, though many parts of the interface have yet to be implemented.
    
    Key features of this implementation include the following:
    
    * A new socket driver has been added, which uses the BSD socket interface to implement the OTP socket driver
    * This driver is supported on generic UNIX and ESP32 platforms. Where possible, a common codebase is used, to minimize the cost of maintenance.
    
    The following operations are supported:
    
    * socket:open/3
    * socket:close/1
    * socket:bind/2
    * socket:listen/1,2
    * socket:accept/1
    * socket:sockname/1
    * socket:peername/1
    * socket:recv/1
    * socket:recvfrom/1
    * socket:send/2
    * socket:sendto/3
    * socket:setopt/3
    * socket:connect/2
    * socket:shutdown/2
    
    Currently, the TCP and UDP protocols is supported. Additional work is needed to support other data types and protocols, as well as name resolution via the OTP net:addrinfo interface.
    
    Signed-off-by: Fred Dushin <fred@dushin.net>
    fadushin committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    8e2d42f View commit details
    Browse the repository at this point in the history