Boost logo

Boost :

Subject: [boost] asio library
From: Peter Foelsche (peter_foelsche_at_[hidden])
Date: 2009-10-26 17:30:12

Out of curiousity (reading somebody comment here regarding socket calls)
I looked into the asio library and found the following example code below.
My question is:
What is the use of the socket object created in the first line?
I think this line must always be followed by some more code.
Because of this it does not make sense, that a library exports this

boost::asio::ip::tcp::socket socket(io_service);
boost::system::error_code ec;, ec);
if (ec)
  // An error occurred.

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