 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors combinators io io.encodings.8-bit
 io.encodings io.encodings.binary io.encodings.utf8 io.files
-io.server io.sockets kernel math.parser namespaces sequences
+io.sockets kernel math.parser namespaces sequences
 ftp io.unix.launcher.parser unicode.case splitting assocs
-classes io.server destructors calendar io.timeouts
+classes io.servers.connection destructors calendar io.timeouts
 io.streams.duplex threads continuations math
 concurrency.promises byte-arrays ;
 IN: ftp.server

        ] with-directory
    ] with-destructors ;

: ftpd ( port -- )
    internet-server "ftp.server"
    latin1 [ handle-client ] with-server ;

: ftpd-main ( -- ) 2100 ftpd ;


        [ drop unrecognized-command t ]
    } case [ handle-client-loop ] when ;

TUPLE: ftp-server < threaded-server ;

M: ftp-server handle-client* ( server -- )
    drop
    [
        "" [
            host-name <ftp-client> client set
