]> gitweb.factorcode.org Git - factor.git/commitdiff
io.sockets: remove send-n-times, broadcast-n-times.
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 21 Feb 2016 02:37:08 +0000 (18:37 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 21 Feb 2016 02:37:08 +0000 (18:37 -0800)
basis/io/sockets/sockets-docs.factor
basis/io/sockets/sockets.factor

index 7e3ec264e9c46350eba6d54621fe100ff2b3bb05..19759d0a90cace3ce4d3a314f27ddfd9b8d98907 100644 (file)
@@ -238,19 +238,6 @@ HELP: send-once
 }
 { $description "Sends a packet one time to the address and closes the sending datagram port." } ;
 
-HELP: send-n-times
-{ $values
-    { "bytes" byte-array } { "addrspec" "an address specifier" } { "n" integer }
-}
-{ $examples
-    "Send a datagram 10 times to localhost, port 7777:"
-    { $example "USING: io.sockets prettyprint ;"
-        "B{ 1 2 3 } f 7777 <inet4> 10 send-n-times"
-        ""
-    }
-}
-{ $description "Sends a packet n times to the address and closes the sending datagram port." } ;
-
 HELP: broadcast-once
 { $values
     { "bytes" byte-array } { "addrspec" "an address specifier" }
@@ -264,21 +251,6 @@ HELP: broadcast-once
 }
 { $description "Broadcasts a packet one time to the address and closes the sending broadcast port." } ;
 
-HELP: broadcast-n-times
-{ $values
-    { "bytes" byte-array } { "addrspec" "an address specifier" } { "n" integer }
-}
-{ $examples
-    "Broadcast a datagram 10 times to localhost, port 7777:"
-    { $example "USING: io.sockets prettyprint ;"
-        "B{ 1 2 3 } f 7777 <inet4> 10 broadcast-n-times"
-        ""
-    }
-}
-{ $description "Broadcasts a packet n times to the address and closes the sending broadcast port." } ;
-
-
-
 HELP: with-random-local-broadcast
 { $values
     { "quot" quotation }
index e786ad0bc961b6f3b9c420c8c5e77794c1c52cc3..49935e194ab3bd262ff53d3ad990c6e1792a4b7f 100644 (file)
@@ -406,19 +406,9 @@ CONSTANT: datagram-size 65536
 : send-once ( bytes addrspec -- )
     [ send ] with-random-local-datagram ;
 
-:: send-n-times ( bytes addrspec n -- )
-    [
-        n swap '[ bytes addrspec _ send ] times
-    ] with-random-local-datagram ;
-
 : broadcast-once ( bytes addrspec -- )
     [ send ] with-random-local-broadcast ;
 
-:: broadcast-n-times ( bytes addrspec n -- )
-    [
-        n swap '[ bytes addrspec _ send ] times
-    ] with-random-local-broadcast ;
-
 MEMO: ipv6-supported? ( -- ? )
     [ "::1" 0 <inet6> binary <server> dispose t ] [ drop f ] recover ;