Update of /cvsroot/boost/boost/libs/asio/example/services
In directory 
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17073/libs/asio/example/services

Modified Files:
        Jamfile daytime_client.cpp stream_socket_service.hpp 
Log Message:
Change error handling to match TR2 proposal.


Index: Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/services/Jamfile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Jamfile     25 Jul 2006 11:04:02 -0000      1.2
+++ Jamfile     8 Nov 2006 05:32:13 -0000       1.3
@@ -22,6 +22,7 @@
 
 exe daytime_client
   : <lib>@boost/libs/thread/build/boost_thread
+    <lib>@boost/libs/system/build/boost_system
     daytime_client.cpp
   : <include>$(BOOST_ROOT)
     <include>../../../..

Index: daytime_client.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/services/daytime_client.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- daytime_client.cpp  25 Jul 2006 11:04:02 -0000      1.2
+++ daytime_client.cpp  8 Nov 2006 05:32:13 -0000       1.3
@@ -19,7 +19,7 @@
 
 char read_buffer[1024];
 
-void read_handler(const boost::asio::error& e,
+void read_handler(const boost::system::error_code& e,
     std::size_t bytes_transferred, debug_stream_socket* s)
 {
   if (!e)
@@ -32,7 +32,7 @@
   }
 }
 
-void connect_handler(const boost::asio::error& e, debug_stream_socket* s,
+void connect_handler(const boost::system::error_code& e, debug_stream_socket* 
s,
     boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
 {
   if (!e)

Index: stream_socket_service.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/libs/asio/example/services/stream_socket_service.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- stream_socket_service.hpp   25 Jul 2006 11:04:02 -0000      1.2
+++ stream_socket_service.hpp   8 Nov 2006 05:32:13 -0000       1.3
@@ -121,12 +121,12 @@
     {
     }
 
-    void operator()(const boost::asio::error& e)
+    void operator()(const boost::system::error_code& e)
     {
       if (e)
       {
         std::string msg = "Asynchronous connect failed: ";
-        msg += e.what();
+        msg += e.message();
         logger_.log(msg);
       }
       else
@@ -228,12 +228,13 @@
     {
     }
 
-    void operator()(const boost::asio::error& e, std::size_t bytes_transferred)
+    void operator()(const boost::system::error_code& e,
+        std::size_t bytes_transferred)
     {
       if (e)
       {
         std::string msg = "Asynchronous send failed: ";
-        msg += e.what();
+        msg += e.message();
         logger_.log(msg);
       }
       else
@@ -280,12 +281,13 @@
     {
     }
 
-    void operator()(const boost::asio::error& e, std::size_t bytes_transferred)
+    void operator()(const boost::system::error_code& e,
+        std::size_t bytes_transferred)
     {
       if (e)
       {
         std::string msg = "Asynchronous receive failed: ";
-        msg += e.what();
+        msg += e.message();
         logger_.log(msg);
       }
       else


-------------------------------------------------------------------------
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

Reply via email to