$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [asio] ip::tcp::iostream usage
From: Gregory Dai (gregory.dai_at_[hidden])
Date: 2008-10-05 00:54:04
The classic example:
int main()
{
boost::asio::ip::tcp::iostream s("www.boost.org", "http");
s << "GET / HTTP/1.0\r\n";
s << "Host: www.boost.org\r\n";
s << "\r\n" << std::flush;
std::cout << s.rdbuf();
return 0;
}
It works.
But with a server on port 8080, it does not seem to work anymore. The host
line was changed to
s << "Host: www.boost.org:8080\r\n";
of course.