#include <boost/noncopyable.hpp>
#include <boost/unordered_set.hpp>
#include <funapi/common/json.h>
#include <funapi/common/json_schema.h>
#include <funapi/distribution/rpc.h>
#include <funapi/network/fun_message.pb.h>
#include <funapi/time/monotonic_clock.h>
#include <funapi/time/wall_clock.h>
#include <funapi/types.h>
#include <vector>
#include <cxxabi.h>
Go to the source code of this file.
Classes | |
class | fun::HandlerRegistry |
class | fun::ProtobufExtensionIdentifier |
class | fun::Session |
Typedefs | |
typedef function< void(const Ptr< Session > &, const Json &, const string &, size_t message_size)> | fun::JsonMessageSendHook |
typedef function< void(const Ptr< Session > &, const Json &, const string &)> | fun::JsonPostMessageHandlerHook |
typedef function< bool(const Ptr< Session > &, const Json &, const string &)> | fun::JsonPreMessageHandlerHook |
typedef function< void(const Ptr< Session > &, const Json &)> | fun::MessageHandler |
JSON message handler type. | |
typedef function< void(const Ptr< Session > &, const Ptr< FunMessage > &)> | fun::MessageHandler2 |
Protobuf message handler type. | |
typedef function< void(const Ptr< Session > &, const Ptr< const FunMessage > &, const string &, size_t message_size)> | fun::ProtobufMessageSendHook |
typedef function< void(const Ptr< Session > &, const Ptr< const FunMessage > &, const string &)> | fun::ProtobufPostMessageHandlerHook |
typedef function< void(const Ptr< Session > &, const Ptr< const FunMessage > &, const int32_t)> | fun::ProtobufPostMessageHandlerHook2 |
typedef function< bool(const Ptr< Session > &, const Ptr< const FunMessage > &, const string &)> | fun::ProtobufPreMessageHandlerHook |
typedef function< bool(const Ptr< Session > &, const Ptr< const FunMessage > &, const int32_t)> | fun::ProtobufPreMessageHandlerHook2 |
typedef function< void(const Ptr< Session > &)> | fun::SessionClosedHandler |
Handler to be notified on session close. This one ignores the close reason. | |
typedef function< void(const Ptr< Session > &, SessionCloseReason)> | fun::SessionClosedHandler2 |
Handler to be notified on session close. This one ignores the close reason. | |
typedef Uuid | fun::SessionId |
typedef function< void(const Ptr< Session > &)> | fun::SessionOpenedHandler |
Handler to be notified on session creation. | |
typedef function< void(const Ptr< Session > &)> | fun::SessionRestoredHandler |
Handler to be notified on session restoration. | |
typedef function< void(const Ptr< Session > &)> | fun::TcpTransportAttachedHandler |
Handler to to noticed on TCP connect if the session uses TCP. | |
typedef function< void(const Ptr< Session > &)> | fun::TcpTransportDetachedHandler |
Handler to be notified on TCP close if the session uses TCP. | |
typedef function< void(const Ptr< Session > &)> | fun::WebSocketTransportAttachedHandler |
Handler to to noticed on Websocket connect if the session uses Websocket. | |
typedef function< void(const Ptr< Session > &)> | fun::WebSocketTransportDetachedHandler |
Handler to be notified on Websocket close if the session uses Websocket. | |
Enumerations | |
enum | EncodingScheme { kUnknownEncoding = 0, kJsonEncoding, kProtobufEncoding } |
enum | Encryption { kDefaultEncryption = 100, kDummyEncryption, kIFunEngine1Encryption, kIFunEngine2Encryption, kChacha20Encryption, kAes128Encryption } |
enum | fun::SessionCloseReason { fun::kClosedForServerDid = 0, fun::kClosedForIdle = 1, fun::kClosedForUnknownSessionId = 2, fun::kClosedForEventTimeout = 3, fun::kClosedForClientRequested = 4, fun::kClosedForRedirection =5 } |
Enumeration to identify why a session has closed. More... | |
enum | TransportProtocol { kDefaultProtocol = 0, kTcp, kUdp, kHttp, kWebSocket } |
Enumerator | |
---|---|
kClosedForServerDid | Server called Session::Close(). |
kClosedForIdle | The session was idle for a long time. |
kClosedForUnknownSessionId | The session id is unknown. |
kClosedForEventTimeout | Event timeout occured. |
kClosedForClientRequested | Client requested to close the session. |
kClosedForRedirection | Client redirected to another server. |