Update of /cvsroot/boost/boost/libs/asio/example/timeouts
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17073/libs/asio/example/timeouts
Modified Files:
Jamfile accept_timeout.cpp connect_timeout.cpp
datagram_receive_timeout.cpp stream_receive_timeout.cpp
Log Message:
Change error handling to match TR2 proposal.
Index: Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/timeouts/Jamfile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Jamfile 25 Jul 2006 11:04:03 -0000 1.2
+++ Jamfile 8 Nov 2006 05:32:13 -0000 1.3
@@ -22,6 +22,7 @@
template asio_timeouts_example
: <lib>@boost/libs/thread/build/boost_thread
+ <lib>@boost/libs/system/build/boost_system
: <include>$(BOOST_ROOT)
<include>../../../..
<define>BOOST_ALL_NO_LIB=1
Index: accept_timeout.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/timeouts/accept_timeout.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- accept_timeout.cpp 25 Jul 2006 11:04:03 -0000 1.2
+++ accept_timeout.cpp 8 Nov 2006 05:32:13 -0000 1.3
@@ -32,7 +32,7 @@
timer_.async_wait(boost::bind(&accept_handler::close, this));
}
- void handle_accept(const error& err)
+ void handle_accept(const boost::system::error_code& err)
{
if (err)
{
@@ -64,10 +64,6 @@
accept_handler ah(ios);
ios.run();
}
- catch (boost::asio::error& e)
- {
- std::cerr << "Exception: " << e << "\n";
- }
catch (std::exception& e)
{
std::cerr << "Exception: " << e.what() << "\n";
Index: connect_timeout.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/timeouts/connect_timeout.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- connect_timeout.cpp 25 Jul 2006 11:04:03 -0000 1.2
+++ connect_timeout.cpp 8 Nov 2006 05:32:13 -0000 1.3
@@ -32,7 +32,7 @@
timer_.async_wait(boost::bind(&connect_handler::close, this));
}
- void handle_connect(const error& err)
+ void handle_connect(const boost::system::error_code& err)
{
if (err)
{
@@ -75,10 +75,6 @@
ios.run();
}
- catch (boost::asio::error& e)
- {
- std::cerr << "Exception: " << e << "\n";
- }
catch (std::exception& e)
{
std::cerr << "Exception: " << e.what() << "\n";
Index: datagram_receive_timeout.cpp
===================================================================
RCS file:
/cvsroot/boost/boost/libs/asio/example/timeouts/datagram_receive_timeout.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- datagram_receive_timeout.cpp 25 Jul 2006 11:04:03 -0000 1.2
+++ datagram_receive_timeout.cpp 8 Nov 2006 05:32:13 -0000 1.3
@@ -33,7 +33,7 @@
timer_.async_wait(boost::bind(&datagram_handler::close, this));
}
- void handle_receive_from(const error& err, size_t length)
+ void handle_receive_from(const boost::system::error_code& err, size_t length)
{
if (err)
{
@@ -67,10 +67,6 @@
datagram_handler dh(ios);
ios.run();
}
- catch (boost::asio::error& e)
- {
- std::cerr << "Exception: " << e << "\n";
- }
catch (std::exception& e)
{
std::cerr << "Exception: " << e.what() << "\n";
Index: stream_receive_timeout.cpp
===================================================================
RCS file:
/cvsroot/boost/boost/libs/asio/example/timeouts/stream_receive_timeout.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- stream_receive_timeout.cpp 25 Jul 2006 11:04:03 -0000 1.2
+++ stream_receive_timeout.cpp 8 Nov 2006 05:32:13 -0000 1.3
@@ -29,7 +29,7 @@
boost::asio::placeholders::error));
}
- void handle_accept(const error& err)
+ void handle_accept(const boost::system::error_code& err)
{
if (err)
{
@@ -47,7 +47,7 @@
}
}
- void handle_recv(const error& err)
+ void handle_recv(const boost::system::error_code& err)
{
if (err)
{
@@ -91,10 +91,6 @@
ios.run();
}
- catch (boost::asio::error& e)
- {
- std::cerr << "Exception: " << e << "\n";
- }
catch (std::exception& e)
{
std::cerr << "Exception: " << e.what() << "\n";
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs