File indexing completed on 2026-04-17 08:35:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_
0021 #define _THRIFT_SERVER_TSIMPLESERVER_H_ 1
0022
0023 #include <thrift/server/TServerFramework.h>
0024
0025 namespace apache {
0026 namespace thrift {
0027 namespace server {
0028
0029
0030
0031
0032
0033
0034 class TSimpleServer : public TServerFramework {
0035 public:
0036 TSimpleServer(
0037 const std::shared_ptr<apache::thrift::TProcessorFactory>& processorFactory,
0038 const std::shared_ptr<apache::thrift::transport::TServerTransport>& serverTransport,
0039 const std::shared_ptr<apache::thrift::transport::TTransportFactory>& transportFactory,
0040 const std::shared_ptr<apache::thrift::protocol::TProtocolFactory>& protocolFactory);
0041
0042 TSimpleServer(
0043 const std::shared_ptr<apache::thrift::TProcessor>& processor,
0044 const std::shared_ptr<apache::thrift::transport::TServerTransport>& serverTransport,
0045 const std::shared_ptr<apache::thrift::transport::TTransportFactory>& transportFactory,
0046 const std::shared_ptr<apache::thrift::protocol::TProtocolFactory>& protocolFactory);
0047
0048 TSimpleServer(
0049 const std::shared_ptr<apache::thrift::TProcessorFactory>& processorFactory,
0050 const std::shared_ptr<apache::thrift::transport::TServerTransport>& serverTransport,
0051 const std::shared_ptr<apache::thrift::transport::TTransportFactory>& inputTransportFactory,
0052 const std::shared_ptr<apache::thrift::transport::TTransportFactory>& outputTransportFactory,
0053 const std::shared_ptr<apache::thrift::protocol::TProtocolFactory>& inputProtocolFactory,
0054 const std::shared_ptr<apache::thrift::protocol::TProtocolFactory>& outputProtocolFactory);
0055
0056 TSimpleServer(
0057 const std::shared_ptr<apache::thrift::TProcessor>& processor,
0058 const std::shared_ptr<apache::thrift::transport::TServerTransport>& serverTransport,
0059 const std::shared_ptr<apache::thrift::transport::TTransportFactory>& inputTransportFactory,
0060 const std::shared_ptr<apache::thrift::transport::TTransportFactory>& outputTransportFactory,
0061 const std::shared_ptr<apache::thrift::protocol::TProtocolFactory>& inputProtocolFactory,
0062 const std::shared_ptr<apache::thrift::protocol::TProtocolFactory>& outputProtocolFactory);
0063
0064 ~TSimpleServer() override;
0065
0066 protected:
0067 void onClientConnected(const std::shared_ptr<TConnectedClient>& pClient) override ;
0068 void onClientDisconnected(TConnectedClient* pClient) override ;
0069
0070 private:
0071 void setConcurrentClientLimit(int64_t newLimit) override;
0072 };
0073 }
0074 }
0075 }
0076
0077 #endif