Current section
Files
Jump to
Current section
Files
src/tcpea_ffi.erl
-module(tcpea_ffi).
-export([send/2, shutdown/2, controlling_process/2]).
send(Socket, Packet) ->
normalize(gen_tcp:send(Socket, Packet)).
shutdown(Socket, How) ->
normalize(gen_tcp:shutdown(Socket, How)).
controlling_process(Socket, Pid) ->
normalize(gen_tcp:controlling_process(Socket, Pid)).
normalize(ok) -> {ok, nil};
normalize({error, _} = E) -> E.