]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/channels/remote/remote-docs.factor
factor: trim using lists
[factor.git] / basis / channels / remote / remote-docs.factor
index 309f764d2da6f1e6a3deb4baef1901fc0932b2ac..72c7b3887d3552bcd12be1421f80b87094cef12d 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2007 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup channels concurrency.distributed ;
+USING: channels help.markup help.syntax io.servers strings ;
 IN: channels.remote
 
 HELP: <remote-channel>
 { $values { "node" "a node object" }
-          { "id" "the id of the published channel on the node" } 
+          { "id" "the id of the published channel on the node" }
           { "remote-channel" remote-channel }
 }
 { $description "Create a remote channel that acts as a proxy for a "
@@ -13,51 +13,51 @@ HELP: <remote-channel>
 "published using " { $link publish } " and the id should be the id "
 "returned by " { $link publish }
 }
-{ $examples 
+{ $examples
   { $code "\"localhost\" 9000 <node> \"ID123456\" <remote-channel> \"foo\" over to" }
 }
 { $see-also publish unpublish } ;
 
 HELP: unpublish
-{ $values { "id" "a string" }
+{ $values { "id" string }
 }
 { $description "Stop a previously published channel from being "
 "accessible by remote nodes."
 }
-{ $examples 
+{ $examples
   { $code "<channel> publish unpublish" }
 }
 { $see-also <remote-channel> publish } ;
 
 HELP: publish
 { $values { "channel" "a channel object" }
-          { "id" "a string" }
+          { "id" string }
 }
 { $description "Make a channel accessible via remote Factor nodes. "
-"An id is returned that can be used by another node to use " 
+"An id is returned that can be used by another node to use "
 { $link to } " and " { $link from } " to access the channel."
 }
-{ $examples 
+{ $examples
   { $code "<channel> publish" }
 }
 { $see-also <remote-channel> unpublish } ;
 
-ARTICLE: { "remote-channels" "remote-channels" } "Remote Channels"
+ARTICLE: "channels.remote" "Remote Channels"
 "Remote channels are channels that can be accessed by other Factor instances. It uses distributed concurrency to serialize and send data between channels."
 $nl
-"To start a remote node, distributed concurrency must have been started. This can be done using " { $link start-node } "."
+"To start a remote node, distributed concurrency must have been started. This can be done using " { $link start-server } "."
 $nl
-{ $snippet "\"myhost.com\" 9001 start-node" } 
+{ $snippet "\"myhost.com\" 9001 start-server" }
 $nl
 "Once the node is started, channels can be published using " { $link publish }
 " to be accessed remotely. " { $link publish } " returns an id which a remote node "
 "needs to know to access the channel."
 $nl
-{ $snippet "channel [ from . ] spawn drop dup publish" }
+{ $snippet "<channel> dup [ from . flush ] curry \"test\" spawn drop publish" }
 $nl
-"Given the id from the snippet above, a remote node can put items in the channel."
+"Given the id from the snippet above, a remote node can put items in the channel (where 123456 is the id):"
 $nl
-{ $snippet "\"myhost.com\" 9001 <node> \"ID123456\" <remote-channel>\n\"hello\" over to" } 
+{ $snippet "\"myhost.com\" 9001 <node> 123456 <remote-channel>\n\"hello\" over to" }
 ;
 
-ABOUT: { "remote-channels" "remote-channels" }
+ABOUT: "channels.remote"