Skip to content

Commit

Permalink
README: fix example
Browse files Browse the repository at this point in the history
When passing in an fd to gen_udp:open/2, the port must be set to 0. The
examples were fixed way back in b5c16f.

msantos#26

Thanks @philipcristiano!
  • Loading branch information
msantos committed Apr 20, 2016
1 parent 2b0d62f commit ffbb9b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ capabilities:
Eshell V5.7.4 (abort with ^G)
1> {ok, FD} = procket:open(53, [{protocol, udp},{type, dgram},{family, inet}]).
{ok,9}
2> {ok, S} = gen_udp:open(53, [{fd,FD}]).
2> {ok, S} = gen_udp:open(0, [{fd,FD}]).
{ok,#Port<0.929>}
3> receive M -> M end.
{udp,#Port<0.929>,{127,0,0,1},47483,"hello\n"}
Expand Down

0 comments on commit ffbb9b6

Please sign in to comment.