1. C++ / Говнокод #9959

    +1000

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    template<class THTTPServerSettings_>
    	class TSettingsApplyer: public TAbstractSettingsApplyer
    	{
    	private:
    		enum
    		{
    			RESPONSE_BUFFER_SIZE=THTTPServerSettings_::ResponseBufferSize>THTTPServerSettings_::FullBufferedResponseSize?THTTPServerSettings_::ResponseBufferSize:THTTPServerSettings_::FullBufferedResponseSize
    		};
    		char _requestBuffer[THTTPServerSettings_::RequestBufferSize];
    		char _responseBuffer[RESPONSE_BUFFER_SIZE];
    		char _requestHeaderBuffer[THTTPServerSettings_::RequestHeaderBufferSize];
    		char _responseHeaderBuffer[THTTPServerSettings_::ResponseHeaderBufferSize];
    		
    	public:
    		TSettingsApplyer(void);
    		virtual void* const GetRequestBuffer(void) const;
    		virtual void* const GetRequestHeaderBuffer(void) const;
    		virtual void* const GetResponseBuffer(void) const;
    		virtual void* const GetResponseHeaderBuffer(void) const;
    		virtual const size_t GetPort(void) const;
    		virtual const size_t GetRequestBufferSize(void) const;
    		virtual const size_t GetRequestHeaderBufferSize(void) const;
    		virtual const size_t GetResponseBufferSize(void) const;
    		virtual const size_t GetResponseHeaderBufferSize(void) const;
    	};
    //...
    template<class TSettings>
    	THTTPServer( TSettings settings ):
    		_SettingsApplyer(*(::new TSettingsApplyer< TSettings >)),

    Запостил: Говногость, 16 Апреля 2012

    Комментарии (2) RSS

    Добавить комментарий