Permalink
Browse files

Remove TODOs and add more examples

  • Loading branch information...
msantos committed May 29, 2010
1 parent 50f5494 commit a85f8be55081d9f91f9146f8ccf6f815005ae7f8
Showing with 13 additions and 9 deletions.
  1. +13 −9 README
View
22 README
@@ -82,6 +82,19 @@ echo is a sample client using procket.
$ erl -pa ebin
1> echo:start(53, [{progname, "sudo priv/procket"}, {protocol, tcp}]).
+ICMP Ping:
+
+1> icmp:ping("www.yahoo.com").
+
+Sniff the network:
+
+1> {ok, S} = procket:listen(0, [{protocol, 16#0008}, {type, raw}, {family, packet}]).
+{ok,12}
+2> procket:recvfrom(S, 2048).
+{ok,<<0,21,175,89,8,38,0,3,82,3,39,36,8,0,69,0,0,52,242,
+ 0,0,0,52,6,188,81,209,...>>}
+3> {ok, S1} = gen_udp:open(0, [binary, {fd, S}, {active, false}]).
+4> gen_udp:recv(S1, 2048).
HOW IT WORKS
@@ -96,12 +109,3 @@ procket uses libanciallary for passing file descriptors between processes:
TODO
-* add an interface for setsockopt(2)
-
-* does Erlang close the passed in fd? add an interface to close() it
-
-* allow procket to manage more than one fd
-
-* experiment with providing an interface for supporting for raw sockets
-
-

0 comments on commit a85f8be

Please sign in to comment.