Squashed commit of the following:

commit 54b3e19c7407707fabddd53872559c58cd5143d2
Author: Doug Coleman <doug.coleman@gmail.com>
Date:   Mon Sep 27 19:10:15 2010 -0500

    Fix typo

commit 3207516dc93e0e1edc9f119efcc79f4484eab244
Author: Doug Coleman <doug.coleman@gmail.com>
Date:   Mon Sep 27 19:08:30 2010 -0500

    Rename io.servers.connection to io.servers
db4
Doug Coleman 2010-09-27 19:12:33 -05:00
parent 4ade3b6a5c
commit 0bbfa64b24
27 changed files with 32 additions and 34 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007 Chris Double. ! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: channels concurrency.distributed help.markup help.syntax USING: channels concurrency.distributed help.markup help.syntax
io.servers.connection ; io.servers ;
IN: channels.remote IN: channels.remote
HELP: <remote-channel> HELP: <remote-channel>

View File

@ -1,7 +1,7 @@
USING: tools.test concurrency.distributed kernel io.files USING: tools.test concurrency.distributed kernel io.files
io.files.temp io.directories arrays io.sockets system calendar io.files.temp io.directories arrays io.sockets system calendar
combinators threads math sequences concurrency.messaging combinators threads math sequences concurrency.messaging
continuations accessors prettyprint io.servers.connection ; continuations accessors prettyprint io.servers ;
FROM: concurrency.messaging => receive send ; FROM: concurrency.messaging => receive send ;
IN: concurrency.distributed.tests IN: concurrency.distributed.tests

View File

@ -1,7 +1,7 @@
! Copyright (C) 2005 Chris Double. All Rights Reserved. ! Copyright (C) 2005 Chris Double. All Rights Reserved.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: serialize sequences concurrency.messaging threads io 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 ; arrays namespaces kernel accessors ;
FROM: io.sockets => host-name <inet> with-client ; FROM: io.sockets => host-name <inet> with-client ;
IN: concurrency.distributed IN: concurrency.distributed

View File

@ -1,6 +1,6 @@
USING: calendar ftp.server io.encodings.ascii io.files USING: calendar ftp.server io.encodings.ascii io.files
io.files.unique namespaces threads tools.test kernel 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 io.pathnames io.directories sequences fry io.backend
continuations ; continuations ;
FROM: ftp.client => ftp-get ; FROM: ftp.client => ftp-get ;

View File

@ -5,7 +5,7 @@ combinators.short-circuit concurrency.promises continuations
destructors ftp io io.directories io.encodings destructors ftp io io.directories io.encodings
io.encodings.8-bit.latin1 io.encodings.binary io.encodings.utf8 io.encodings.8-bit.latin1 io.encodings.binary io.encodings.utf8
io.files io.files.info io.files.types io.pathnames 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 kernel logging math math.bitwise math.parser namespaces
sequences simple-tokenizer splitting strings threads sequences simple-tokenizer splitting strings threads
tools.files unicode.case ; tools.files unicode.case ;

View File

@ -1,6 +1,6 @@
USING: tools.test http furnace.sessions furnace.actions USING: tools.test http furnace.sessions furnace.actions
http.server http.server.responses math namespaces make kernel 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 io.streams.string io.files io.files.temp io.directories
splitting destructors sequences db db.tuples db.sqlite splitting destructors sequences db db.tuples db.sqlite
continuations urls math.parser furnace furnace.utilities ; continuations urls math.parser furnace furnace.utilities ;

View File

@ -205,7 +205,7 @@ Set-Cookie: oo="bar; a=b"; comment="your mom"; httponly=yes
! Live-fire exercise ! Live-fire exercise
USING: http.server.static furnace.sessions furnace.alloy USING: http.server.static furnace.sessions furnace.alloy
furnace.actions furnace.auth furnace.auth.login furnace.db 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 threads
http.server.responses http.server.redirection furnace.redirection http.server.responses http.server.redirection furnace.redirection
http.server.dispatchers db.tuples ; http.server.dispatchers db.tuples ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! 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 IN: http.server.remapping
SYMBOL: port-remapping SYMBOL: port-remapping

View File

@ -1,5 +1,5 @@
USING: help.markup help.syntax io.streams.string quotations strings urls 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 IN: http.server
HELP: trivial-responder HELP: trivial-responder
@ -109,7 +109,7 @@ ARTICLE: "http.server.variables" "HTTP server variables"
} ; } ;
ARTICLE: "http.server" "HTTP server" 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 { $subsections
"http.server.responders" "http.server.responders"
"http.server.requests" "http.server.requests"

View File

@ -15,7 +15,7 @@ io.encodings.binary
io.streams.limited io.streams.limited
io.streams.string io.streams.string
io.streams.throwing io.streams.throwing
io.servers.connection io.servers
io.timeouts io.timeouts
io.crlf io.crlf
fry logging logging.insomniac calendar urls urls.encoding fry logging logging.insomniac calendar urls urls.encoding

View File

@ -1,6 +1,6 @@
USING: calendar classes concurrency.semaphores help.markup USING: calendar classes concurrency.semaphores help.markup
help.syntax io io.sockets io.sockets.secure math quotations ; help.syntax io io.sockets io.sockets.secure math quotations ;
IN: io.servers.connection IN: io.servers
ARTICLE: "server-config" "Threaded server configuration" 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 } "." "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" 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." ; "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" ARTICLE: "io.servers" "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." "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" } { $subsections "server-examples" }
"Creating threaded servers with client handler quotations:" "Creating threaded servers with client handler quotations:"
{ $subsections <threaded-server> } { $subsections <threaded-server> }
@ -82,7 +82,7 @@ ARTICLE: "io.servers.connection" "Threaded servers"
"Additionally, the " { $link local-address } " and " "Additionally, the " { $link local-address } " and "
{ $subsections remote-address } " variables are set, as in " { $link with-client } "." ; { $subsections remote-address } " variables are set, as in " { $link with-client } "." ;
ABOUT: "io.servers.connection" ABOUT: "io.servers"
HELP: threaded-server HELP: threaded-server
{ $var-description "In client handlers, stores the current threaded server instance." } { $var-description "In client handlers, stores the current threaded server instance." }

View File

@ -1,8 +1,8 @@
USING: accessors calendar concurrency.promises fry io USING: accessors calendar concurrency.promises fry io
io.encodings.ascii io.servers.connection io.encodings.ascii io.servers
io.servers.connection.private io.sockets kernel namespaces io.servers.private io.sockets kernel namespaces
sequences threads tools.test ; sequences threads tools.test ;
IN: io.servers.connection IN: io.servers
[ t ] [ ascii <threaded-server> listen-on empty? ] unit-test [ t ] [ ascii <threaded-server> listen-on empty? ] unit-test

View File

@ -8,7 +8,7 @@ io io.sockets io.sockets.secure io.streams.duplex io.styles
io.timeouts kernel logging make math math.parser namespaces io.timeouts kernel logging make math math.parser namespaces
present prettyprint random sequences sets strings threads ; present prettyprint random sequences sets strings threads ;
FROM: namespaces => set ; FROM: namespaces => set ;
IN: io.servers.connection IN: io.servers
TUPLE: threaded-server < identity-tuple TUPLE: threaded-server < identity-tuple
name name

View File

@ -52,7 +52,7 @@ $nl
{ { $link inet4 } " - a TCP/IP connection to an IPv4 address and port number; no name lookup is performed" } { { $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" } { { $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 <server> } " 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 <server> } " 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 $nl
"The " { $vocab-link "io.sockets.secure" } " vocabulary implements secure, encrypted sockets via SSL and TLS." ; "The " { $vocab-link "io.sockets.secure" } " vocabulary implements secure, encrypted sockets via SSL and TLS." ;
@ -170,7 +170,7 @@ HELP: <server>
{ $code "f 1234 <inet> resolve-host" } { $code "f 1234 <inet> 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:" "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 <inet> resolve-host" } { $code "\"localhost\" 1234 <inet> 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 $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:" "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 { $unchecked-example

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs continuations fry http.server io USING: accessors assocs continuations fry http.server io
io.encodings.ascii io.files io.files.unique 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 kernel math.ranges mime.multipart multiline namespaces random
sequences strings threads tools.test ; sequences strings threads tools.test ;
IN: mime.multipart.tests IN: mime.multipart.tests

View File

@ -52,7 +52,7 @@ os macosx? [
] each ] each
USING: http.client http.server http.server.dispatchers 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 SINGLETON: quit-responder

View File

@ -1,8 +1,7 @@
! Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz. ! Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz.
! See http://factorcode.org/license.txt for BSD license. ! 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 ; kernel listener math namespaces ;
IN: fuel.remote IN: fuel.remote
<PRIVATE <PRIVATE

View File

@ -359,7 +359,7 @@ CONSTANT: google-slides
} }
{ $slide "Example: time server" { $slide "Example: time server"
{ $vocab-link "time-server" } { $vocab-link "time-server" }
{ "Demonstrates " { $vocab-link "io.servers.connection" } " vocabulary, threads" } { "Demonstrates " { $vocab-link "io.servers" } " vocabulary, threads" }
} }
{ $slide "Example: what is my IP?" { $slide "Example: what is my IP?"
{ $vocab-link "webapps.ip" } { $vocab-link "webapps.ip" }

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman. ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs calendar continuations destructors io USING: accessors assocs calendar continuations destructors io
io.encodings.binary io.servers.connection io.sockets io.encodings.binary io.servers io.sockets
io.streams.duplex fry kernel locals math math.ranges multiline io.streams.duplex fry kernel locals math math.ranges multiline
namespaces prettyprint random sequences sets splitting threads namespaces prettyprint random sequences sets splitting threads
tools.continuations ; tools.continuations ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors calendar calendar.format io io.encodings.ascii USING: accessors calendar calendar.format io io.encodings.ascii
io.servers.connection kernel threads ; io.servers kernel threads ;
IN: time-server IN: time-server
: handle-time-client ( -- ) : handle-time-client ( -- )

View File

@ -1,5 +1,4 @@
USING: listener io.servers.connection io.encodings.utf8 USING: listener io.servers io.encodings.utf8 accessors kernel ;
accessors kernel ;
IN: tty-server IN: tty-server
: <tty-server> ( port -- ) : <tty-server> ( port -- )

View File

@ -8,7 +8,7 @@ furnace.auth.features.registration furnace.auth.login
furnace.boilerplate furnace.redirection html.forms http.server furnace.boilerplate furnace.redirection html.forms http.server
http.server.dispatchers kernel namespaces site-watcher site-watcher.db http.server.dispatchers kernel namespaces site-watcher site-watcher.db
site-watcher.private urls validators io.sockets.secure.unix.debug 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.common webapps.site-watcher.watching
webapps.site-watcher.spidering ; webapps.site-watcher.spidering ;
QUALIFIED: assocs QUALIFIED: assocs

View File

@ -122,7 +122,7 @@ furnace.auth.features.edit-profile
furnace.auth.features.deactivate-user furnace.auth.features.deactivate-user
db.sqlite db.sqlite
furnace.alloy furnace.alloy
io.servers.connection io.servers
io.sockets.secure ; io.sockets.secure ;
: <login-config> ( responder -- responder' ) : <login-config> ( responder -- responder' )

View File

@ -1,7 +1,7 @@
! Copyright (c) 2008, 2010 Slava Pestov ! Copyright (c) 2008, 2010 Slava Pestov
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel sequences assocs io.files io.pathnames 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 namespaces db db.tuples db.sqlite smtp urls
logging.insomniac logging.insomniac
html.templates.chloe html.templates.chloe