1 IN: io.servers.connection
2 USING: tools.test io.servers.connection io.sockets namespaces
3 io.servers.connection.private kernel accessors sequences
4 concurrency.promises io.encodings.ascii io threads calendar ;
6 [ t ] [ <threaded-server> listen-on empty? ] unit-test
10 25 internet-server >>insecure
16 T{ inet4 f "1.2.3.4" 1234 } T{ inet4 f "1.2.3.5" 1235 }
17 [ log-connection ] 2keep
18 [ remote-address get = ] [ local-address get = ] bi*
22 [ ] [ <threaded-server> init-server drop ] unit-test
27 init-server semaphore>> count>>
34 [ "Hello world." write stop-this-server ] >>handler
35 dup start-server* sockets>> first addr>> port>> "port" set
38 [ "Hello world." ] [ "localhost" "port" get <inet> ascii <client> drop contents ] unit-test