X Tutup
/* * Copyright (C) 2012 Yee Young Han (http://blog.naver.com/websearch) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _HTTP_STACK_CALLBACK_H_ #define _HTTP_STACK_CALLBACK_H_ #include "HttpMessage.h" class CHttpStackSession; /** * @ingroup HttpStack * @brief HTTP ¼­¹ö callback ÀÎÅÍÆäÀ̽º */ class IHttpStackCallBack { public: IHttpStackCallBack(){}; virtual ~IHttpStackCallBack(){}; /** * @ingroup HttpStack * @brief HTTP ¿äû ¼ö½Å À̺¥Æ® callback * @param pclsRequest HTTP ¿äû ¸Þ½ÃÁö * @param pclsResponse HTTP ÀÀ´ä ¸Þ½ÃÁö - ÀÀ¿ë¿¡¼­ ÀúÀåÇÑ´Ù. * @returns ÀÀ¿ë¿¡¼­ HTTP ÀÀ´ä ¸Þ½ÃÁö¸¦ Á¤»óÀûÀ¸·Î »ý¼ºÇϸé true ¸¦ ¸®ÅÏÇÏ°í ±×·¸Áö ¾ÊÀ¸¸é false ¸¦ ¸®ÅÏÇÑ´Ù. */ virtual bool RecvHttpRequest( CHttpMessage * pclsRequest, CHttpMessage * pclsResponse ) = 0; /** * @ingroup HttpStack * @brief WebSocket Ŭ¶óÀÌ¾ðÆ® TCP ¿¬°á ½ÃÀÛ À̺¥Æ® callback * @param pszClientIp WebSocket Ŭ¶óÀÌ¾ðÆ® IP ÁÖ¼Ò * @param iClientPort WebSocket Ŭ¶óÀÌ¾ðÆ® Æ÷Æ® ¹øÈ£ */ virtual void WebSocketConnected( const char * pszClientIp, int iClientPort ) = 0; /** * @ingroup HttpStack * @brief WebSocket Ŭ¶óÀÌ¾ðÆ® TCP ¿¬°á Á¾·á À̺¥Æ® callback * @param pszClientIp WebSocket Ŭ¶óÀÌ¾ðÆ® IP ÁÖ¼Ò * @param iClientPort WebSocket Ŭ¶óÀÌ¾ðÆ® Æ÷Æ® ¹øÈ£ */ virtual void WebSocketClosed( const char * pszClientIp, int iClientPort ) = 0; /** * @ingroup HttpStack * @brief WebSocket Ŭ¶óÀÌ¾ðÆ® µ¥ÀÌÅÍ ¼ö½Å À̺¥Æ® callback * @param pszClientIp WebSocket Ŭ¶óÀÌ¾ðÆ® IP ÁÖ¼Ò * @param iClientPort WebSocket Ŭ¶óÀÌ¾ðÆ® Æ÷Æ® ¹øÈ£ * @param strData WebSocket Ŭ¶óÀÌ¾ðÆ®°¡ Àü¼ÛÇÑ µ¥ÀÌÅÍ * @param pclsSession HTTP ¼¼¼Ç Á¤º¸ * @returns WebSocket Ŭ¶óÀÌ¾ðÆ® ¿¬°áÀ» À¯ÁöÇÏ·Á¸é true ¸¦ ¸®ÅÏÇÏ°í ±×·¸Áö ¾ÊÀ¸¸é false ¸¦ ¸®ÅÏÇÑ´Ù. */ virtual bool WebSocketData( const char * pszClientIp, int iClientPort, std::string & strData, CHttpStackSession * pclsSession ) = 0; }; #endif
X Tutup