Loading...
Searching...
No Matches
listen_handler.hpp
Go to the documentation of this file.
#ifndef PROTON_LISTEN_HANDLER_HPP
#define PROTON_LISTEN_HANDLER_HPP
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include "./fwd.hpp"
#include "./internal/export.hpp"
#include <string>
namespace proton {
// XXX Discuss more
class PN_CPP_CLASS_EXTERN listen_handler {
public:
PN_CPP_EXTERN virtual ~listen_handler();
PN_CPP_EXTERN virtual void on_open(listener&);
PN_CPP_EXTERN virtual connection_options on_accept(listener&);
PN_CPP_EXTERN virtual void on_error(listener&, const std::string&);
PN_CPP_EXTERN virtual void on_close(listener&);
};
} // proton
#endif // PROTON_LISTEN_HANDLER_HPP
proton::connection_options
Options for creating a connection.
Definition connection_options.hpp:67
proton::listen_handler
Unsettled API - A handler for incoming connections.
Definition listen_handler.hpp:39
proton::listen_handler::on_error
virtual void on_error(listener &, const std::string &)
Called if there is a listening error, with an error message.
proton::listen_handler::on_accept
virtual connection_options on_accept(listener &)
Called for each accepted connection.
proton::listen_handler::on_open
virtual void on_open(listener &)
Called when the listener is opened successfully.
proton::listen_handler::on_close
virtual void on_close(listener &)
Called when this listen_handler is no longer needed, and can be deleted.
proton::listener
A listener for incoming connections.
Definition listener.hpp:33
proton::map
A collection of key-value pairs.
Definition map.hpp:69
fwd.hpp
Forward declarations.
proton
The main Proton namespace.
Definition annotation_key.hpp:33