Boost logo

Boost :

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("", "http");

    s << "GET / HTTP/1.0\r\n";
    s << "Host:\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:\r\n";

of course.

Boost list run by bdawes at, gregod at, cpdaniel at, john at