1 USING: accessors continuations io.sockets io.sockets.windows kernel sequences tools.test
3 IN: io.sockets.windows.tests
5 : google-socket ( -- socket )
6 URL" http://www.google.com" url-addr resolve-host first
7 SOCK_STREAM open-socket ;
11 { FIONBIO FIONREAD } [
12 google-socket swap execute( -- x )
13 [ 1 set-ioctl-socket ] [ 0 set-ioctl-socket ] 2bi
18 [ google-socket 1337 -8 set-ioctl-socket ]
19 [ [ winsock-exception? ] [ n>> 10045 = ] bi and ] recover