Qpid Proton C++ API  0.17.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
listen_handler Class Referenceabstract

Experimental - A handler for incoming connections. More...

#include <listen_handler.hpp>

Public Member Functions

virtual connection_options on_accept ()=0
 Called for each accepted connection. More...
 
virtual void on_error (const std::string &)
 Called if there is a listening error, with an error message. More...
 
virtual void on_close ()
 Called when this listen_handler is no longer needed, and can be deleted.
 

Detailed Description

Experimental - A handler for incoming connections.

Implement this interface and pass to proton::container::listen() to be notified of new connections.

Examples:
mt/broker.cpp, and mt/epoll_container.cpp.

Member Function Documentation

virtual connection_options on_accept ( )
pure virtual

Called for each accepted connection.

Returns connection_options to apply, including a proton::messaging_handler for the connection. messaging_handler::on_connection_open() will be called with the proton::connection, it can call connection::open() to accept or connection::close() to reject the connection.

virtual void on_error ( const std::string &  )
inlinevirtual

Called if there is a listening error, with an error message.

close() will also be called.

Examples:
mt/epoll_container.cpp.

The documentation for this class was generated from the following file: