// $Id$
//
-// Copyright (C) 2006
+// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
///////////////////////////////cc.p////////////////////////////////////////
namespace {
-
+
namespace sl = senf;
-
+
class MySocketHandle
: public sl::ServerSocketHandle<sl::test::SomeProtocol::Policy>
{
sl::test::SomeWritePolicy
>::policy OtherSocketPolicy;
typedef sl::SocketHandle<OtherSocketPolicy> OtherSocketHandle;
-
+
MySocketHandle myh;
OtherSocketHandle osh (myh);
osh = myh;
senf::NoAddressingPolicy
>::policy> SomeOtherSocketHandle;
typedef sl::ClientSocketHandle<OtherSocketPolicy> OtherClientHandle;
-
+
BOOST_CHECK_NO_THROW( sl::dynamic_socket_cast<SomeSocketHandle>(osh) );
BOOST_CHECK_THROW( sl::dynamic_socket_cast<SomeOtherSocketHandle>(osh),
std::bad_cast );
MySocketHandle::ClientSocketHandle client = myh.accept();
BOOST_CHECK_EQUAL( client.fd(), -1 );
}
-
+
}
\f
// Local Variables:
// mode: c++
+// fill-column: 100
// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: