The Vish Visualization Shell 0.3
Vish
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Wizt::VSocketAction::Receiver Class Referenceabstract

Functor object for callbacks when data are received on a socket. More...

#include <ocean/streams/VSocketAction.hpp>

Inheritance diagram for Wizt::VSocketAction::Receiver:
MemCore::ReferenceBase< Receiver > Wizt::HTTPServer::Client Wizt::MessageRetriever Wizt::RemoteViewer::Communicator Wizt::RemoteVish::Communicator

Public Member Functions

bool expect (const RefPtr< Expectation > &E, socket_t sd)
 Set an expectation object to this receiver.
 
 Receiver ()
 Constructor.
 
virtual void shutdown ()
 Callback function when this object is going to be closed.
 
virtual ~Receiver ()=0
 Virtual Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< Receiver >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< Receiver, Receiver > &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 (Receiver *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.
 

Public Attributes

RefPtr< ExpectationMyExpectation
 If there is an expectation object associated with this receiver, then it will be filled first until any more data are delivered to the receive() functions.
 
std::string status
 A freely definable string describing the status of this connection.
 

Protected Member Functions

virtual bool receive (socket_t)=0
 Callback function invoked when data are ready to be read from the socket.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< Receiver >
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.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< Receiver >
using reference_domain_t = Receiver
 The type of the base class.
 
using SelfPtr_t = WeakPtr< Receiver, Receiver >
 Type for a pointer to this object itself.
 

Detailed Description

Functor object for callbacks when data are received on a socket.

Member Function Documentation

◆ receive()

virtual bool Wizt::VSocketAction::Receiver::receive ( socket_t  )
protectedpure virtual

Callback function invoked when data are ready to be read from the socket.

Returns
false if the connection shall be closed after this data transfer, otherwise return true to indicate it shall be kept alive.

Implemented in Wizt::RemoteViewer::Communicator, Wizt::RemoteVish::Communicator, Wizt::HTTPServer::Client, and Wizt::MessageRetriever.