File: netgetmany.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (25 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# open 5 network connections at once
dim a$(5)
dim t$(5)

a$ = { "www.google.com", "www.yahoo.com", "www.cnn.com", "www.espn.com", "www.basic256.org"}

for t = 0 to 4
   NETCONNECT t, a$[t], 80
   print t + " connected to " + a$[t]
next t
for t = 0 to 4
   NETWRITE t, "GET HTTP/1.1" + chr(13) + chr(10) + chr(13) + chr(10)
   print t + " request written"
next t
for t = 0 to 4
   t$[t] = NETREAD(t)
   print t + " read"
next t
for t = 0 to 4
   print t + " " + left(t$[t],40)
next t
for t = 0 to 4
   netclose t
   print t + " closed"
next t