summaryrefslogtreecommitdiff
path: root/src/syncClient.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-11-24 15:58:21 +0000
committerChristian Pointner <equinox@anytun.org>2008-11-24 15:58:21 +0000
commit347f038c20550a4e5e2a4747c339d36991bb5214 (patch)
tree2091fcc2e661f8adbb0fd28659fb28b70d433779 /src/syncClient.cpp
parentfixed anytun-showtables (diff)
fixes for boost 1.35 and higher
Diffstat (limited to 'src/syncClient.cpp')
-rw-r--r--src/syncClient.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/syncClient.cpp b/src/syncClient.cpp
index d6ede4a..48f8d27 100644
--- a/src/syncClient.cpp
+++ b/src/syncClient.cpp
@@ -52,37 +52,37 @@ void SyncClient::run()
{
try
{
- asio::io_service io_service;
+ boost::asio::io_service io_service;
for(;;)
{
std::stringstream portsrt;
portsrt << port_;
- asio::ip::tcp::resolver resolver(io_service);
- asio::ip::tcp::resolver::query query( hostname_, portsrt.str());
- asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
- asio::ip::tcp::resolver::iterator end;
+ boost::asio::ip::tcp::resolver resolver(io_service);
+ boost::asio::ip::tcp::resolver::query query( hostname_, portsrt.str());
+ boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
+ boost::asio::ip::tcp::resolver::iterator end;
- asio::ip::tcp::socket socket(io_service);
- asio::error_code error = asio::error::host_not_found;
+ boost::asio::ip::tcp::socket socket(io_service);
+ boost::system::error_code error = boost::asio::error::host_not_found;
while (error && endpoint_iterator != end)
{
socket.close();
socket.connect(*endpoint_iterator++, error);
}
if (error)
- throw asio::system_error(error);
+ throw boost::system::system_error(error);
for (;;)
{
boost::array<char, 128> buf;
- asio::error_code error;
+ boost::system::error_code error;
- size_t len = socket.read_some(asio::buffer(buf), error);
+ size_t len = socket.read_some(boost::asio::buffer(buf), error);
- if (error == asio::error::eof)
+ if (error == boost::asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
- throw asio::system_error(error); // Some other error.
+ throw boost::system::system_error(error); // Some other error.
OnRawData(buf.data(), len);
}