diff --git a/basis/io/sockets/sockets-docs.factor b/basis/io/sockets/sockets-docs.factor index 7e3ec264e9..19759d0a90 100644 --- a/basis/io/sockets/sockets-docs.factor +++ b/basis/io/sockets/sockets-docs.factor @@ -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 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 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 } diff --git a/basis/io/sockets/sockets.factor b/basis/io/sockets/sockets.factor index e786ad0bc9..49935e194a 100644 --- a/basis/io/sockets/sockets.factor +++ b/basis/io/sockets/sockets.factor @@ -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 binary dispose t ] [ drop f ] recover ;