Erlang interface to low level socket operations