Skip to content

Remarks #1

@jacob-wg2

Description

@jacob-wg2

Looks great.

Some minor issues (to be continued):

https://github.com/sebastiw/sock/blob/cbcb23ab699a51c6bfef2798c40ee0ec0d6566dc/src/sock.erl#L62-L63

Binding to all local interfaces by default is probably problematic, especially when local IP addresses are used. Which local IP addresses are announced to the peer in that case? What happens if a new interface is added or an existing goes down/up?

https://github.com/sebastiw/sock/blob/cbcb23ab699a51c6bfef2798c40ee0ec0d6566dc/src/sock_assoc.erl#L62-L64

Wondering what dialyzer will say depending on USE_SOCKET. Why not using -ifdef?

https://github.com/sebastiw/sock/blob/cbcb23ab699a51c6bfef2798c40ee0ec0d6566dc/src/sock_utils.erl#L26-L27

Wouldn't cope with inet6 and shortened addresses (less than 3 dots).

What about having a function that takes two inet:ip_address and a number (mask) instead? Or at least using net:parse_address internally instead of split?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions