From 0bbfa64b2478129a9e3e63bae34ed25f2375555f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 27 Sep 2010 19:12:33 -0500 Subject: [PATCH] Squashed commit of the following: commit 54b3e19c7407707fabddd53872559c58cd5143d2 Author: Doug Coleman Date: Mon Sep 27 19:10:15 2010 -0500 Fix typo commit 3207516dc93e0e1edc9f119efcc79f4484eab244 Author: Doug Coleman Date: Mon Sep 27 19:08:30 2010 -0500 Rename io.servers.connection to io.servers --- basis/channels/remote/remote-docs.factor | 2 +- basis/concurrency/distributed/distributed-tests.factor | 4 ++-- basis/concurrency/distributed/distributed.factor | 2 +- basis/ftp/server/server-tests.factor | 2 +- basis/ftp/server/server.factor | 2 +- basis/furnace/sessions/sessions-tests.factor | 2 +- basis/http/http-tests.factor | 2 +- basis/http/server/remapping/remapping.factor | 2 +- basis/http/server/server-docs.factor | 4 ++-- basis/http/server/server.factor | 2 +- basis/io/servers/{connection => }/authors.txt | 0 .../connection-docs.factor => servers-docs.factor} | 8 ++++---- .../connection-tests.factor => servers-tests.factor} | 6 +++--- .../{connection/connection.factor => servers.factor} | 2 +- basis/io/servers/{connection => }/summary.txt | 0 basis/io/servers/{connection => }/tags.txt | 0 basis/io/sockets/sockets-docs.factor | 4 ++-- basis/mime/multipart/multipart-tests.factor | 2 +- basis/tools/deploy/deploy-tests.factor | 2 +- extra/fuel/remote/remote.factor | 3 +-- extra/google-tech-talk/google-tech-talk.factor | 2 +- extra/managed-server/managed-server.factor | 2 +- extra/time-server/time-server.factor | 2 +- extra/tty-server/tty-server.factor | 3 +-- extra/webapps/site-watcher/site-watcher.factor | 2 +- extra/webapps/todo/todo.factor | 2 +- extra/websites/concatenative/concatenative.factor | 2 +- 27 files changed, 32 insertions(+), 34 deletions(-) rename basis/io/servers/{connection => }/authors.txt (100%) rename basis/io/servers/{connection/connection-docs.factor => servers-docs.factor} (94%) rename basis/io/servers/{connection/connection-tests.factor => servers-tests.factor} (89%) rename basis/io/servers/{connection/connection.factor => servers.factor} (99%) rename basis/io/servers/{connection => }/summary.txt (100%) rename basis/io/servers/{connection => }/tags.txt (100%) diff --git a/basis/channels/remote/remote-docs.factor b/basis/channels/remote/remote-docs.factor index 266d774056..2215d959a3 100644 --- a/basis/channels/remote/remote-docs.factor +++ b/basis/channels/remote/remote-docs.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007 Chris Double. ! See http://factorcode.org/license.txt for BSD license. USING: channels concurrency.distributed help.markup help.syntax -io.servers.connection ; +io.servers ; IN: channels.remote HELP: diff --git a/basis/concurrency/distributed/distributed-tests.factor b/basis/concurrency/distributed/distributed-tests.factor index 3a6693c440..ebe5bc5da2 100644 --- a/basis/concurrency/distributed/distributed-tests.factor +++ b/basis/concurrency/distributed/distributed-tests.factor @@ -1,7 +1,7 @@ USING: tools.test concurrency.distributed kernel io.files io.files.temp io.directories arrays io.sockets system calendar combinators threads math sequences concurrency.messaging -continuations accessors prettyprint io.servers.connection ; +continuations accessors prettyprint io.servers ; FROM: concurrency.messaging => receive send ; IN: concurrency.distributed.tests @@ -36,4 +36,4 @@ test-node-server [ test-node-client "thread-a" send 100 seconds receive-timeout ] unit-test -] with-threaded-server \ No newline at end of file +] with-threaded-server diff --git a/basis/concurrency/distributed/distributed.factor b/basis/concurrency/distributed/distributed.factor index f18f5279ea..153f0c9ad6 100644 --- a/basis/concurrency/distributed/distributed.factor +++ b/basis/concurrency/distributed/distributed.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005 Chris Double. All Rights Reserved. ! See http://factorcode.org/license.txt for BSD license. USING: serialize sequences concurrency.messaging threads io -io.servers.connection io.encodings.binary assocs init +io.servers io.encodings.binary assocs init arrays namespaces kernel accessors ; FROM: io.sockets => host-name with-client ; IN: concurrency.distributed diff --git a/basis/ftp/server/server-tests.factor b/basis/ftp/server/server-tests.factor index 2954db0f8b..fa6afa30cc 100644 --- a/basis/ftp/server/server-tests.factor +++ b/basis/ftp/server/server-tests.factor @@ -1,6 +1,6 @@ USING: calendar ftp.server io.encodings.ascii io.files io.files.unique namespaces threads tools.test kernel -io.servers.connection ftp.client accessors urls +io.servers ftp.client accessors urls io.pathnames io.directories sequences fry io.backend continuations ; FROM: ftp.client => ftp-get ; diff --git a/basis/ftp/server/server.factor b/basis/ftp/server/server.factor index e6a47c3ffd..c1508f8ad5 100644 --- a/basis/ftp/server/server.factor +++ b/basis/ftp/server/server.factor @@ -5,7 +5,7 @@ combinators.short-circuit concurrency.promises continuations destructors ftp io io.directories io.encodings io.encodings.8-bit.latin1 io.encodings.binary io.encodings.utf8 io.files io.files.info io.files.types io.pathnames -io.servers.connection io.sockets io.streams.string io.timeouts +io.servers io.sockets io.streams.string io.timeouts kernel logging math math.bitwise math.parser namespaces sequences simple-tokenizer splitting strings threads tools.files unicode.case ; diff --git a/basis/furnace/sessions/sessions-tests.factor b/basis/furnace/sessions/sessions-tests.factor index 49311ee891..1ac3dbd51a 100644 --- a/basis/furnace/sessions/sessions-tests.factor +++ b/basis/furnace/sessions/sessions-tests.factor @@ -1,6 +1,6 @@ USING: tools.test http furnace.sessions furnace.actions http.server http.server.responses math namespaces make kernel -accessors io.sockets io.servers.connection prettyprint +accessors io.sockets io.servers prettyprint io.streams.string io.files io.files.temp io.directories splitting destructors sequences db db.tuples db.sqlite continuations urls math.parser furnace furnace.utilities ; diff --git a/basis/http/http-tests.factor b/basis/http/http-tests.factor index 7be7c43399..1a74e3fc6d 100644 --- a/basis/http/http-tests.factor +++ b/basis/http/http-tests.factor @@ -205,7 +205,7 @@ Set-Cookie: oo="bar; a=b"; comment="your mom"; httponly=yes ! Live-fire exercise USING: http.server.static furnace.sessions furnace.alloy furnace.actions furnace.auth furnace.auth.login furnace.db -io.servers.connection io.files io.files.temp io.directories io +io.servers io.files io.files.temp io.directories io threads http.server.responses http.server.redirection furnace.redirection http.server.dispatchers db.tuples ; diff --git a/basis/http/server/remapping/remapping.factor b/basis/http/server/remapping/remapping.factor index 36e769731b..6eed900acc 100644 --- a/basis/http/server/remapping/remapping.factor +++ b/basis/http/server/remapping/remapping.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: namespaces assocs kernel io.servers.connection ; +USING: namespaces assocs kernel io.servers ; IN: http.server.remapping SYMBOL: port-remapping diff --git a/basis/http/server/server-docs.factor b/basis/http/server/server-docs.factor index 7e8d230971..5d1b231f60 100644 --- a/basis/http/server/server-docs.factor +++ b/basis/http/server/server-docs.factor @@ -1,5 +1,5 @@ USING: help.markup help.syntax io.streams.string quotations strings urls -http vocabs.refresh math io.servers.connection assocs ; +http vocabs.refresh math io.servers assocs ; IN: http.server HELP: trivial-responder @@ -109,7 +109,7 @@ ARTICLE: "http.server.variables" "HTTP server variables" } ; ARTICLE: "http.server" "HTTP server" -"The " { $vocab-link "http.server" } " vocabulary implements an HTTP and HTTPS server on top of " { $vocab-link "io.servers.connection" } "." +"The " { $vocab-link "http.server" } " vocabulary implements an HTTP and HTTPS server on top of " { $vocab-link "io.servers" } "." { $subsections "http.server.responders" "http.server.requests" diff --git a/basis/http/server/server.factor b/basis/http/server/server.factor index 9e4a8ac4bf..c5bc88f81f 100644 --- a/basis/http/server/server.factor +++ b/basis/http/server/server.factor @@ -15,7 +15,7 @@ io.encodings.binary io.streams.limited io.streams.string io.streams.throwing -io.servers.connection +io.servers io.timeouts io.crlf fry logging logging.insomniac calendar urls urls.encoding diff --git a/basis/io/servers/connection/authors.txt b/basis/io/servers/authors.txt similarity index 100% rename from basis/io/servers/connection/authors.txt rename to basis/io/servers/authors.txt diff --git a/basis/io/servers/connection/connection-docs.factor b/basis/io/servers/servers-docs.factor similarity index 94% rename from basis/io/servers/connection/connection-docs.factor rename to basis/io/servers/servers-docs.factor index 4dd8efdbe3..051dfad975 100644 --- a/basis/io/servers/connection/connection-docs.factor +++ b/basis/io/servers/servers-docs.factor @@ -1,6 +1,6 @@ USING: calendar classes concurrency.semaphores help.markup help.syntax io io.sockets io.sockets.secure math quotations ; -IN: io.servers.connection +IN: io.servers ARTICLE: "server-config" "Threaded server configuration" "The " { $link threaded-server } " tuple has a variety of slots which can be set before starting the server with " { $link start-server } "." @@ -52,8 +52,8 @@ $nl ARTICLE: "server-examples" "Threaded server examples" "The " { $vocab-link "time-server" } " vocabulary implements a simple threaded server which sends the current time to the client. The " { $vocab-link "concurrency.distributed" } ", " { $vocab-link "ftp.server" } ", and " { $vocab-link "http.server" } " vocabularies demonstrate more complex usage of the threaded server library." ; -ARTICLE: "io.servers.connection" "Threaded servers" -"The " { $vocab-link "io.servers.connection" } " vocabulary implements a generic server abstraction for " { $link "network-connection" } ". A set of threads listen for connections, and additional threads are spawned for each client connection. In addition to this basic functionality, it provides some advanced features such as logging, connection limits and secure socket support." +ARTICLE: "io.servers" "Threaded servers" +"The " { $vocab-link "io.servers" } " vocabulary implements a generic server abstraction for " { $link "network-connection" } ". A set of threads listen for connections, and additional threads are spawned for each client connection. In addition to this basic functionality, it provides some advanced features such as logging, connection limits and secure socket support." { $subsections "server-examples" } "Creating threaded servers with client handler quotations:" { $subsections } @@ -82,7 +82,7 @@ ARTICLE: "io.servers.connection" "Threaded servers" "Additionally, the " { $link local-address } " and " { $subsections remote-address } " variables are set, as in " { $link with-client } "." ; -ABOUT: "io.servers.connection" +ABOUT: "io.servers" HELP: threaded-server { $var-description "In client handlers, stores the current threaded server instance." } diff --git a/basis/io/servers/connection/connection-tests.factor b/basis/io/servers/servers-tests.factor similarity index 89% rename from basis/io/servers/connection/connection-tests.factor rename to basis/io/servers/servers-tests.factor index 72f4706957..bcba7f7d90 100644 --- a/basis/io/servers/connection/connection-tests.factor +++ b/basis/io/servers/servers-tests.factor @@ -1,8 +1,8 @@ USING: accessors calendar concurrency.promises fry io -io.encodings.ascii io.servers.connection -io.servers.connection.private io.sockets kernel namespaces +io.encodings.ascii io.servers +io.servers.private io.sockets kernel namespaces sequences threads tools.test ; -IN: io.servers.connection +IN: io.servers [ t ] [ ascii listen-on empty? ] unit-test diff --git a/basis/io/servers/connection/connection.factor b/basis/io/servers/servers.factor similarity index 99% rename from basis/io/servers/connection/connection.factor rename to basis/io/servers/servers.factor index 940b20f762..66d0112561 100644 --- a/basis/io/servers/connection/connection.factor +++ b/basis/io/servers/servers.factor @@ -8,7 +8,7 @@ io io.sockets io.sockets.secure io.streams.duplex io.styles io.timeouts kernel logging make math math.parser namespaces present prettyprint random sequences sets strings threads ; FROM: namespaces => set ; -IN: io.servers.connection +IN: io.servers TUPLE: threaded-server < identity-tuple name diff --git a/basis/io/servers/connection/summary.txt b/basis/io/servers/summary.txt similarity index 100% rename from basis/io/servers/connection/summary.txt rename to basis/io/servers/summary.txt diff --git a/basis/io/servers/connection/tags.txt b/basis/io/servers/tags.txt similarity index 100% rename from basis/io/servers/connection/tags.txt rename to basis/io/servers/tags.txt diff --git a/basis/io/sockets/sockets-docs.factor b/basis/io/sockets/sockets-docs.factor index d0977dd3d0..95ad57a46d 100644 --- a/basis/io/sockets/sockets-docs.factor +++ b/basis/io/sockets/sockets-docs.factor @@ -52,7 +52,7 @@ $nl { { $link inet4 } " - a TCP/IP connection to an IPv4 address and port number; no name lookup is performed" } { { $link inet6 } " - a TCP/IP connection to an IPv6 address and port number; no name lookup is performed" } } -"The " { $vocab-link "io.servers.connection" } " library defines high-level wrappers around " { $link } " which makes it easy to listen for IPv4, IPv6 and secure socket connections simultaneously, perform logging, and optionally only allow connections from the loopback interface." +"The " { $vocab-link "io.servers" } " library defines high-level wrappers around " { $link } " which makes it easy to listen for IPv4, IPv6 and secure socket connections simultaneously, perform logging, and optionally only allow connections from the loopback interface." $nl "The " { $vocab-link "io.sockets.secure" } " vocabulary implements secure, encrypted sockets via SSL and TLS." ; @@ -170,7 +170,7 @@ HELP: { $code "f 1234 resolve-host" } "To start a server which listens for connections from the loopback interface only, use an address specifier returned by the following code, where 1234 is the desired port number:" { $code "\"localhost\" 1234 resolve-host" } - "Since " { $link resolve-host } " can return multiple address specifiers, your server code must listen on them all to work properly. The " { $vocab-link "io.servers.connection" } " vocabulary can be used to help with this." + "Since " { $link resolve-host } " can return multiple address specifiers, your server code must listen on them all to work properly. The " { $vocab-link "io.servers" } " vocabulary can be used to help with this." $nl "To start a TCP/IP server which listens for connections on a randomly-assigned port, set the port number in the address specifier to 0, and then read the " { $snippet "addr" } " slot of the server instance to obtain the actual port number it is listening on:" { $unchecked-example diff --git a/basis/mime/multipart/multipart-tests.factor b/basis/mime/multipart/multipart-tests.factor index 6c3094fe22..bfeb1335ee 100644 --- a/basis/mime/multipart/multipart-tests.factor +++ b/basis/mime/multipart/multipart-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs continuations fry http.server io io.encodings.ascii io.files io.files.unique -io.servers.connection io.streams.duplex io.streams.string +io.servers io.streams.duplex io.streams.string kernel math.ranges mime.multipart multiline namespaces random sequences strings threads tools.test ; IN: mime.multipart.tests diff --git a/basis/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor index fa446ad44c..e8888717ab 100644 --- a/basis/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -52,7 +52,7 @@ os macosx? [ ] each USING: http.client http.server http.server.dispatchers -http.server.responses http.server.static io.servers.connection ; +http.server.responses http.server.static io.servers ; SINGLETON: quit-responder diff --git a/extra/fuel/remote/remote.factor b/extra/fuel/remote/remote.factor index a8007bd858..e7b797fc19 100644 --- a/extra/fuel/remote/remote.factor +++ b/extra/fuel/remote/remote.factor @@ -1,8 +1,7 @@ ! Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors debugger io io.encodings.utf8 io.servers.connection +USING: accessors debugger io io.encodings.utf8 io.servers kernel listener math namespaces ; - IN: fuel.remote ( port -- ) diff --git a/extra/webapps/site-watcher/site-watcher.factor b/extra/webapps/site-watcher/site-watcher.factor index 05fabfcf9d..a354544399 100644 --- a/extra/webapps/site-watcher/site-watcher.factor +++ b/extra/webapps/site-watcher/site-watcher.factor @@ -8,7 +8,7 @@ furnace.auth.features.registration furnace.auth.login furnace.boilerplate furnace.redirection html.forms http.server http.server.dispatchers kernel namespaces site-watcher site-watcher.db site-watcher.private urls validators io.sockets.secure.unix.debug -io.servers.connection io.files.temp db db.tuples sequences +io.servers io.files.temp db db.tuples sequences webapps.site-watcher.common webapps.site-watcher.watching webapps.site-watcher.spidering ; QUALIFIED: assocs diff --git a/extra/webapps/todo/todo.factor b/extra/webapps/todo/todo.factor index e5753f3c53..01ed2402f7 100644 --- a/extra/webapps/todo/todo.factor +++ b/extra/webapps/todo/todo.factor @@ -122,7 +122,7 @@ furnace.auth.features.edit-profile furnace.auth.features.deactivate-user db.sqlite furnace.alloy -io.servers.connection +io.servers io.sockets.secure ; : ( responder -- responder' ) diff --git a/extra/websites/concatenative/concatenative.factor b/extra/websites/concatenative/concatenative.factor index 35e4150ba9..61b4f7d887 100644 --- a/extra/websites/concatenative/concatenative.factor +++ b/extra/websites/concatenative/concatenative.factor @@ -1,7 +1,7 @@ ! Copyright (c) 2008, 2010 Slava Pestov ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel sequences assocs io.files io.pathnames -io.sockets io.sockets.secure io.servers.connection +io.sockets io.sockets.secure io.servers namespaces db db.tuples db.sqlite smtp urls logging.insomniac html.templates.chloe