All pastes #335113 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-01 03:20 UTC
rendered paste body
;; /sockopen example domain 80
on *:sockopen:example:{
  sockwrite -nt $sockname GET /page HTTP/1.1
  sockwrite -nt $sockname Host: domain (altscripts.net for example)
  sockwrite -nt $sockname $crlf
}
on *:sockread:example:{
  If ($sockerr) {
    halt
  }
  else {
    var %read
    var %i = 0
    sockread &read
    while ($sockbr) {
      sockread -f %read
     echo -s . %read
    }
  }
}