Author: | ycros |
---|---|
Mode: | factor |
Date: | Sun, 9 Aug 2009 20:24:12 |
USING: io io.servers.connection io.encodings.ascii threads accessors ; IN: echo-server : handle-echo-client ( -- ) [ print yield ] each-line ; : <echo-server> ( -- threaded-server ) ascii <threaded-server> "echo-server" >>name 3333 >>insecure [ handle-echo-client ] >>handler ; : start-echo-server ( -- threaded-server ) <echo-server> [ start-server ] in-thread ;