2020-05-16 04:52:06 +00:00
|
|
|
BEGIN {
|
|
|
|
|
|
|
|
|
|
|
|
x = sys::socket (sys::AF_INET, sys::SOCK_STREAM, 0);
|
|
|
|
sys::connect (x, "127.0.0.1:9988");
|
|
|
|
|
2021-07-22 07:30:20 +00:00
|
|
|
msg = b"GET /home/hyung-hwan/projects/hio/t/b.sh HTTP/1.1\r\n\
|
2020-05-16 04:52:06 +00:00
|
|
|
Host: www.google.com\r\n\
|
2020-05-20 10:25:12 +00:00
|
|
|
Connection: close\r\n\r\n";
|
|
|
|
|
2021-07-22 07:30:20 +00:00
|
|
|
#msg = b"GET /home/hyung-hwan/projects/hio/t/b.sh HTTP/1.1\r\n\
|
2020-05-20 10:25:12 +00:00
|
|
|
#Host: www.google.com\r\n\
|
|
|
|
#Connection: Keep-Alive\r\n\r\n";
|
2020-05-16 04:52:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
sys::write (x, msg);
|
2020-05-24 17:25:27 +00:00
|
|
|
while (sys::read (x, buf) > 0) { printf ("%s", buf); }
|
2020-05-16 04:52:06 +00:00
|
|
|
sys::close (x);
|
|
|
|
}
|