The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
Wizt::HTTPServer::AcceptConnections Struct Reference

Callback action that is invoked when a new client connection to the server port. More...

#include <ocean/streams/HTTPServer.hpp>

Inheritance diagram for Wizt::HTTPServer::AcceptConnections:
Wizt::VSocketAction::Connector MemCore::ReferenceBase< Connector >

Public Member Functions

bool accept (socket_t fd) override
 Callback function invoked by the VSocketAction instance when a new client has connected to a server that lurks around via the VSocketAction::listen() call.
 
- Public Member Functions inherited from Wizt::VSocketAction::Connector
 Connector ()
 Constructor.
 
virtual ~Connector ()=0
 Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< Connector >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< Connector, Connector > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (Connector *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< Connector >
using reference_domain_t = Connector
 The type of the base class.
 
using SelfPtr_t = WeakPtr< Connector, Connector >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< Connector >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

Callback action that is invoked when a new client connection to the server port.

Member Function Documentation

◆ accept()

bool Wizt::HTTPServer::AcceptConnections::accept ( socket_t  )
overridevirtual

Callback function invoked by the VSocketAction instance when a new client has connected to a server that lurks around via the VSocketAction::listen() call.

The Connector is responsible itself for registering data receiver callbacks, if such is desired.

Returns
false if the server socket shall be closed, true if the server shall continue listening.

Implements Wizt::VSocketAction::Connector.

References Wizt::VStream::getPeername().