// =================================================================================================== // // = LIBRARY // ULib - c++ library // // = FILENAME // client_image_skeleton.h - this is a skeleton for handle accepted connections from UServer client // // = AUTHOR // Stefano Casazza // // =================================================================================================== #ifndef U_CLIENT_IMAGE_SKELETON_H #define U_CLIENT_IMAGE_SKELETON_H 1 #include /** * @class USkeletonClientImage * * @brief Handles accepted connections from UServer client */ template class U_EXPORT USkeletonClientImage : public UClientImage { public: USkeletonClientImage(USocket* p) : UClientImage(p) { U_TRACE_CTOR(0, USkeletonClientImage, "%p", p) } virtual ~USkeletonClientImage() { U_TRACE_DTOR(0, USkeletonClientImage) } // DEBUG #if defined(U_STDCPP_ENABLE) && defined(DEBUG) const char* dump(bool reset) const { return UClientImage_Base::dump(reset); } #endif protected: // define method VIRTUAL of class UEventFd virtual int handlerRead() U_DECL_OVERRIDE { U_TRACE_NO_PARAM(0, "USkeletonClientImage::handlerRead()") int result = UClientImage_Base::handlerRead(); // read request... U_RETURN(result); } private: U_DISALLOW_COPY_AND_ASSIGN(USkeletonClientImage) }; #ifdef USE_LIBSSL template <> class U_EXPORT USkeletonClientImage : public UClientImage { public: USkeletonClientImage(USocket* p) : UClientImage(p) { U_TRACE_CTOR(0, USkeletonClientImage, "%p", p) } virtual ~USkeletonClientImage() { U_TRACE_DTOR(0, USkeletonClientImage) } // DEBUG #if defined(U_STDCPP_ENABLE) && defined(DEBUG) const char* dump(bool reset) const { return UClientImage_Base::dump(reset); } #endif protected: // define method VIRTUAL of class UEventFd virtual int handlerRead() U_DECL_OVERRIDE { U_TRACE_NO_PARAM(0, "USkeletonClientImage::handlerRead()") int result = UClientImage_Base::handlerRead(); // read request... U_RETURN(result); } private: U_DISALLOW_COPY_AND_ASSIGN(USkeletonClientImage) }; #endif #endif