I’ve read the help page on hopen but must be missing something. code.kx.com/q/ref/filewords/#hopen
hopen hangs until I press Ctrl-C, I’ve tried this with other webpages as well (ebay, google, etc.)
I would like to be able to issue multiple GET requests while the socket handle is open.
Any hints as to what I’m doing incorrectly?
/ this works
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}printf ‘GET /q/ HTTP/1.1\r\nHost: code.kx.com\r\nConnection: close\r\n\r\n’ | nc code.kx.com 80
/ here’s an example of what I would like to run on q.
h:hopen `:code.kx.com:80
h"GET /q/ HTTP/1.1\r\nHost: code.kx.com\r\nConnection: close\r\n\r\n"
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545}KDB+ 3.5 2017.11.30 Copyright (C) 1993-2017 Kx Systems
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}m32/ 4()core 8192MB x x x NONEXPIRE
)\ping code.kx.com
“PING code.kx.com (74.50.57.51): 56 data bytes”
“64 bytes from 74.50.57.51: icmp_seq=0 ttl=50 time=53.275 ms”
“64 bytes from 74.50.57.51: icmp_seq=1 ttl=50 time=61.843 ms”
“64 bytes from 74.50.57.51: icmp_seq=2 ttl=50 time=49.324 ms”
“”
“— code.kx.com ping statistics —”
“3 packets transmitted, 3 packets received, 0.0% packet loss”
“round-trip min/avg/max/stddev = 49.324/54.814/61.843/5.225 ms”
q)h:hopen `:code.kx.com:80 / wait 15 seconds then press ctrl-c
'hop. OS reports: Interrupted system call
[0] h:hopen `:code.kx.com:80 / wait 15 seconds then press ctrl-c
^
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}q)
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}