msantos / procket

Erlang interface to low level socket operations
http://blog.listincomprehension.com/search/label/procket
BSD 3-Clause "New" or "Revised" License
283 stars 80 forks source link

Added seqpacket and UNIX/local socket types #29

Closed qwertystop closed 7 years ago

qwertystop commented 7 years ago

Added the unix/local socket family (AF_LOCAL/AF_UNIX) and the seqpacket type (SOCK_SEQPACKET).

Uncertainties before confirmation: I don't currently have access to computers on other OSs to check the potential need for case statements, and Google isn't being helpful there.

msantos commented 7 years ago

Thanks! I did a quick check on freebsd, openbsd and linux ARM and the values are consistent.

msantos commented 7 years ago

I missed the values for AF_LOCAL, AF_UNIX and AF_FILE were already defined:

https://github.com/msantos/procket/blob/master/src/procket.erl#L493

I'll revert that part of the patch.

qwertystop commented 7 years ago

Oops, yeah, I missed that as well. Should the readme get an update for this? It doesn't have any version changes listed since 0.04, so I didn't want to add this one in (since there were things in the middle not listed)

msantos commented 7 years ago

The change log in the README is really old. At this point, it should probably be removed.

If you have some time, updating the "DATA TYPES" section for family and type would be very much appreciated!