Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
ConnectionOrientedMasterSocket.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
5
7
8 /*
9 ********************************************************************************
10 ********** Foundation::IO::Network::ConnectionOrientedMasterSocket::Ptr ********
11 ********************************************************************************
12 */
13 inline ConnectionOrientedMasterSocket::Ptr::Ptr (nullptr_t)
14 : inherited{nullptr}
15 {
16 }
17 inline ConnectionOrientedMasterSocket::Ptr::Ptr (shared_ptr<_IRep>&& rep)
18 : inherited{move (rep)}
19 {
20 }
21 inline ConnectionOrientedMasterSocket::Ptr::Ptr (const shared_ptr<_IRep>& rep)
22 : inherited{rep}
23 {
24 }
25 inline void ConnectionOrientedMasterSocket::Ptr::Listen (unsigned int backlog) const
26 {
27 Debug::AssertExternallySynchronizedMutex::ReadContext declareContext{this->_fThisAssertExternallySynchronized};
28 _ref ().Listen (backlog);
29 }
30 inline ConnectionOrientedStreamSocket::Ptr ConnectionOrientedMasterSocket::Ptr::Accept () const
31 {
32 Debug::AssertExternallySynchronizedMutex::ReadContext declareContext{this->_fThisAssertExternallySynchronized};
33 return _ref ().Accept ();
34 }
35 inline shared_ptr<ConnectionOrientedMasterSocket::_IRep> ConnectionOrientedMasterSocket::Ptr::_GetSharedRep () const
36 {
37 Debug::AssertExternallySynchronizedMutex::ReadContext declareContext{this->_fThisAssertExternallySynchronized};
38 return Debug::UncheckedDynamicPointerCast<ConnectionOrientedMasterSocket::_IRep> (inherited::_GetSharedRep ());
39 }
40 inline ConnectionOrientedMasterSocket::_IRep& ConnectionOrientedMasterSocket::Ptr::_ref () const
41 {
42 AssertMember (&inherited::_ref (), _IRep);
43 return *reinterpret_cast<_IRep*> (&inherited::_ref ());
44 }
45 inline const ConnectionOrientedMasterSocket::_IRep& ConnectionOrientedMasterSocket::Ptr::_cref () const
46 {
47 AssertMember (&inherited::_cref (), _IRep);
48 return *reinterpret_cast<const _IRep*> (&inherited::_cref ());
49 }
50
51}
#define AssertMember(p, c)
Definition Assertions.h:312
shared_lock< const AssertExternallySynchronizedMutex > ReadContext
Instantiate AssertExternallySynchronizedMutex::ReadContext to designate an area of code where protect...