|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51441 - in sandbox/net/libs/net: . src
From: oliver.kowalke_at_[hidden]
Date: 2009-02-24 16:36:16
Author: olli
Date: 2009-02-24 16:36:15 EST (Tue, 24 Feb 2009)
New Revision: 51441
URL: http://svn.boost.org/trac/boost/changeset/51441
Log:
* cpp files for ip4::udp::one2one and ip4::net::one2many added
Added:
sandbox/net/libs/net/
sandbox/net/libs/net/src/
sandbox/net/libs/net/src/ipv4_udp_one2many.cpp (contents, props changed)
sandbox/net/libs/net/src/ipv4_udp_one2one.cpp (contents, props changed)
Added: sandbox/net/libs/net/src/ipv4_udp_one2many.cpp
==============================================================================
--- (empty file)
+++ sandbox/net/libs/net/src/ipv4_udp_one2many.cpp 2009-02-24 16:36:15 EST (Tue, 24 Feb 2009)
@@ -0,0 +1,32 @@
+#include <boost/net/ipv4/udp/one2many.hpp>
+
+#include <boost/net/detail/move.hpp>
+
+#include <boost/net/ipv4/udp/one2one.hpp>
+
+namespace boost { namespace net {
+namespace ipv4 { namespace udp
+{
+ one2many::one2many( net::detail::socket const& s)
+ :
+ socket_base_type( s),
+ net::detail::options( member),
+ ipv4::detail::options( member)
+ {}
+
+const one2one
+one2many::connect( address const& addr)
+{
+ BOOST_ASSERT( is_valid() );
+
+ system::error_code ec;
+ net::detail::connect(
+ native_handle(),
+ addr.sockaddr_ptr(),
+ addr.size(),
+ ec);
+ if ( ec) throw_exception( system::system_error( ec) );
+
+ return one2one( net::detail::socket( member.move() ) );
+}
+}}}}
Added: sandbox/net/libs/net/src/ipv4_udp_one2one.cpp
==============================================================================
--- (empty file)
+++ sandbox/net/libs/net/src/ipv4_udp_one2one.cpp 2009-02-24 16:36:15 EST (Tue, 24 Feb 2009)
@@ -0,0 +1,36 @@
+#include <boost/net/ipv4/udp/one2one.hpp>
+
+#include <boost/net/detail/move.hpp>
+
+#include <boost/net/ipv4/udp/one2many.hpp>
+
+namespace boost { namespace net {
+namespace ipv4 { namespace udp
+{
+ one2one::one2one( net::detail::socket const& s)
+ :
+ socket_base_type( s),
+ net::detail::options( member),
+ ipv4::detail::options( member)
+ {}
+
+const one2many
+one2one::disconnect()
+{
+ BOOST_ASSERT( is_valid() );
+
+ sockaddr_in4_type addr;
+ sockaddr_len_type len( sizeof( sockaddr_in4_type) );
+ ::bzero( & addr, len);
+ addr.sin_family = family_unspecified;
+ void * vp( & addr);
+ system::error_code ec;
+ net::detail::connect(
+ native_handle(),
+ static_cast< sockaddr_type * >( vp),
+ len,
+ ec);
+
+ return one2many( net::detail::socket( member.move() ) );
+}
+}}}}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk