19 #ifndef INCLUDE_RCF_ASIO_HPP
20 #define INCLUDE_RCF_ASIO_HPP
22 #include <RCF/Config.hpp>
25 #define BOOST_DATE_TIME_NO_LIB
26 #define BOOST_REGEX_NO_LIB
28 #include <RCF/AsioFwd.hpp>
38 #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
39 # if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
40 # error WinSock.h has already been included. Define WIN32_LEAN_AND_MEAN in your build, to avoid implicit inclusion of WinSock.h.
41 # endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
46 #pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used
49 #ifdef RCF_USE_BOOST_ASIO
50 #include <boost/asio.hpp>
52 #include <RCF/external/asio/asio.hpp>
56 #ifdef RCF_USE_BOOST_ASIO
57 #ifdef BOOST_ASIO_HAS_LOCAL_SOCKETS
58 #define RCF_HAS_LOCAL_SOCKETS
61 #ifdef ASIO_HAS_LOCAL_SOCKETS
62 #define RCF_HAS_LOCAL_SOCKETS
66 #include <RCF/AsioDeadlineTimer.hpp>
75 typedef ASIO_NS::ip::tcp::socket AsioSocket;
76 typedef boost::shared_ptr<AsioSocket> AsioSocketPtr;
78 typedef ASIO_NS::const_buffer AsioConstBuffer;
87 typedef std::vector<AsioConstBuffer> BufferVec;
88 typedef boost::shared_ptr<BufferVec> BufferVecPtr;
90 typedef AsioConstBuffer value_type;
91 typedef BufferVec::const_iterator const_iterator;
95 mVecPtr.reset(
new std::vector<AsioConstBuffer>() );
98 const_iterator begin()
const
100 return mVecPtr->begin();
103 const_iterator end()
const
105 return mVecPtr->end();
108 BufferVecPtr mVecPtr;
114 #endif // ! INCLUDE_RCF_ASIO_HPP