/** * * callbacks.h * An Tao * * Public header file in trantor lib. * * Copyright 2018, An Tao. All rights reserved. * Use of this source code is governed by a BSD-style license * that can be found in the License file. * * */ #pragma once #include #include namespace trantor { enum class SSLError { kSSLHandshakeError, kSSLInvalidCertificate }; using TimerCallback = std::function; // the data has been read to (buf, len) class TcpConnection; class MsgBuffer; using TcpConnectionPtr = std::shared_ptr; // tcp server and connection callback using RecvMessageCallback = std::function; using ConnectionErrorCallback = std::function; using ConnectionCallback = std::function; using CloseCallback = std::function; using WriteCompleteCallback = std::function; using HighWaterMarkCallback = std::function; using SSLErrorCallback = std::function; } // namespace trantor