亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? url.h

?? common c++提供socket
?? H
字號:
// Copyright (C) 2001-2005 Open Source Telecom Corporation.//// 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 2 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.// // As a special exception, you may use this file as part of a free software// library without restriction.  Specifically, if other files instantiate// templates or use macros or inline functions from this file, or you compile// this file and link it with other files to produce an executable, this// file does not by itself cause the resulting executable to be covered by// the GNU General Public License.  This exception does not however    // invalidate any other reasons why the executable file might be covered by// the GNU General Public License.    //// This exception applies only to the code released under the name GNU// Common C++.  If you copy code from other releases into a copy of GNU// Common C++, as the General Public License permits, the exception does// not apply to the code that you add in this way.  To avoid misleading// anyone as to the status of such modified files, you must delete// this exception notice from them.//// If you write modifications of your own for GNU Common C++, it is your choice// whether to permit this exception to apply to your modifications.// If you do not wish that, delete this exception notice.///** * @file url.h * @short URL streams abstraction. **/#ifndef	CCXX_URL_H_#define	CCXX_URL_H_#ifndef CCXX_CONFIG_H_#include <cc++/config.h>#endif#ifndef CCXX_SOCKET_H_#include <cc++/socket.h>#endif#ifndef	CCXX_MIME_H_#include <cc++/mime.h>#endif#ifdef	CCXX_NAMESPACESnamespace ost {#endif/** * A URL processing version of TCPStream. * * @author David Sugar <dyfet@ostel.com> * @short C++ url processing stream class. */class __EXPORT URLStream : public TCPStream{public:	/**	 * Return error for url fetch	 */ 	typedef enum	{		errSuccess = 0,		errUnreachable,		errMissing,		errDenied,		errInvalid,		errForbidden,		errUnauthorized,		errRelocated,		errFailure,		errTimeout,		errInterface	} Error;	/**	 * Type of authentication	 */	typedef enum	{		authAnonymous = 0,		authBasic	} Authentication;	/**	 * Encoding used in transfer	 */	typedef enum	{		encodingBinary = 0,		encodingChunked	} Encoding;	/**	 * Type of fetch	 */	typedef	enum	{		methodHttpGet,		methodHttpPut,		methodHttpPost,		methodHttpPostMultipart,		methodFtpGet,		methodFtpPut,		methodFileGet,		methodFilePut	} Method;	/**	 * http protocol version	 */	typedef	enum	{		protocolHttp1_0,		protocolHttp1_1	} Protocol;private:	const char *agent, *referer, *cookie, *pragma, *user, *password;	const char *proxyUser, *proxyPasswd;	const char *localif;	IPV4Host proxyHost;#ifdef	CCXX_IPV6	IPV6Host v6proxyHost;#endif	tpport_t proxyPort;	Method urlmethod;	Encoding encoding;	Protocol protocol;	Authentication auth;	Authentication proxyAuth;	timeout_t timeout;	bool persistent;	bool follow;	unsigned chunk;	Error getHTTPHeaders();	URLStream(const URLStream& rhs);protected:	ost::String m_host, m_address;        /**         * Send http header to server.         *         * @param url base to send header to         * @param vars to post or use in get method         * @param bufsize of stream buffering to use         * @return success or class error         */	Error sendHTTPHeader(const char *url, const char **vars, size_t bufsize);        /**         * Called if stream buffer needs refilling.         *         * @return number of bytes refilled or error if < 0         */	int underflow(void);        /**         * Derived method for async or timed I/O function on url stream.         *         * @return number of bytes read or < 0 for error.         * @param buffer to read stream data into.         * @param len of bytes to read from stream.         * @param timer to wait for data in milliseconds.         */	virtual int aRead(char *buffer, size_t len, timeout_t timer);        /**         * Derived method for async or timed I/O function on url stream.         *         * @return number of bytes written or < 0 for error.         * @param buffer to write stream data from.         * @param len of bytes to write to stream.         * @param timer to wait for data in milliseconds.         */	virtual int aWrite(char *buffer, size_t len, timeout_t timer);	/**	 * Derived method to receive and parse http "headers".	 *	 * @param header keyword.	 * @param value header keyword value.	 */	virtual void httpHeader(const char *header, const char *value);	/**	 * A virtual to insert additional header info into the request.	 *	 * @return array of header attributes to add.	 */	virtual char **extraHeader(void);public:	/**	 * Construct an instance of URL stream.	 *	 * @param family protocol to use.	 * @param timer for default timeout on I/O operations.	 */	URLStream(Family family = IPV4, timeout_t timer = 0);	/**	 * Line parsing with conversion.	 *	 * @return URLStream object reference.	 * @param buffer to store.	 * @param len maximum buffer size.	 */	URLStream &getline(char *buffer, size_t len);	/**	 * Get URL data from a named stream of a known buffer size.	 *	 * @return url error code.	 * @param url name of resource.	 * @param buffer size of buffer.	 */	Error get(const char *url, size_t buffer = 512);	/**	* Get URL data from a named stream of a known buffer size.	* Requesting URL defined in previous calls of setAddress() and 	* setHost() functions.	*	* @return url error code.	* @param buffer size of buffer.	*/	Error get(size_t buffer = 512);			/**	 * Submit URL with vars passed as argument array.  This submit	 * assumes "GET" method.  Use "post" member to perform post.	 *	 * @return url error code.	 * @param url name of resource.	 * @param vars to set.	 * @param buffer size of buffer.	 */	Error submit(const char *url, const char **vars, size_t buffer = 512);	/**	 * Post URL vars with post method.	 *	 * @return success or error code.	 * @param url name of resource being posted.	 * @param vars to set in post.	 * @param buffer size of buffer.	 */	Error post(const char *url, const char **vars, size_t buffer = 512);	/**	 * Post URL with MIME multipart form.	 *	 * @return success or error code.	 * @param url name of resource being posted.	 * @param form multi-part resource.	 * @param buffer size to use.	 */	Error post(const char *url, MIMEMultipartForm &form, size_t buffer = 512);	/**	 * Used to fetch header information for a resource.	 *	 * @return url error code.	 * @param url name of resource.	 * @param buffer size of buffer.	 */	Error head(const char *url, size_t buffer = 512);	/**	 * Close the URL stream for a new connection.	 */	void close();	/**	 * Set the referer url.	 *	 * @param str referer string.	 */	void setReferer(const char *str);	/**	* Set the host for the url	*	* @param str host address.	*/	inline void setHost(const char *str)		{m_host = str;};	/**	* Set the address for the url	*	* @param str address in the URL.	*/	inline void setAddress(const char *str)		{m_address = str;};	/**	 * Set the cookie to pass.	 *	 * @param str cookie string.	 */	inline void setCookie(const char *str)		{cookie = str;};	/**	 * Set user id for the url.	 *	 * @param str user id.	 */	inline void setUser(const char *str)		{user = str;};	/**	 * Set password for the url.	 *	 * @param str password.	 */	inline void setPassword(const char *str)		{password = str;};	/**	 * Set authentication type for the url.	 *	 * @param a authentication.	 * @param str string.	 */	void setAuthentication(Authentication a, const char *str = NULL); 	/** 	 * Set proxy user id for the url. 	 * 	 * @param str user id. 	 */ 	inline void setProxyUser(const char *str)	 	{proxyUser = str;};  	/** 	 * Set proxy password for the url. 	 * 	 * @param str password. 	 */ 	inline void setProxyPassword(const char *str) 		{proxyPasswd = str;};  	/** 	 * Set proxy authentication type for the url. 	 * 	 * @param a authentication. 	 * @param str string. 	 */ 	void setProxyAuthentication(Authentication a, const char *str = NULL);	/**	 * Set the pragmas.	 *	 * @param str pragma setting.	 */	inline void setPragma(const char *str)		{pragma = str;};	/**	 * Set the proxy server used.	 *	 * @param host proxy host.	 * @param port proxy port.	 */	void setProxy(const char *host, tpport_t port);	/**	 * Set the agent.	 *	 * @param str agent value.	 */	inline void setAgent(const char *str)		{agent = str;};	/**	 * Get url method (and protocol) employed.	 *	 * @return url method in effect.	 */	inline Method getMethod(void)		{return urlmethod;};	/**	 * Set socket timeout characteristics for processing URL	 * requests.  Set to 0 for no default timeouts.	 *	 * @param to timeout to set.	 */	inline void setTimeout(timeout_t to)		{timeout = to;};	/**	 * Specify url following.  Set to false to disable following	 * of relocation requests.	 *	 * @param enable true to enable following.	 */	inline void setFollow(bool enable)		{follow = enable;};	/**	 * Specify http protocol level being used.	 *	 * @param pro protocol level.	 */	inline void setProtocol(Protocol pro)		{protocol = pro;};	/**	 * Specify local interface to use	 *	 * @param intf Local interface name	 */	inline void setLocalInterface(const char *intf) 	{localif=intf;} };/** @relates URLStream * Decode an url parameter (ie "\%20" -> " ") * @param source string * @param dest destination buffer. If NULL source is used */__EXPORT char* urlDecode(char *source, char *dest = NULL);/** @relates URLStream * Encode an url parameter (ie " " -> "+") * @param source string * @param dest destination buffer. Do not overlap with source * @param size destination buffer size. */__EXPORT char* urlEncode(const char *source, char *dest, size_t size);/** @relates URLStream * Decode a string using base64 coding. * Destination size should be at least strlen(src)+1. * Destination will be a string, so is always terminated . * This function is deprecated, base64 can use binary source, not only string * use overloaded b64Decode. * @return string coded * @param src  source buffer * @param dest destination buffer. If NULL src is used */__EXPORT char* b64Decode(char *src, char *dest = NULL);/** @relates URLStream * Encode a string using base64 coding. * Destination size should be at least strlen(src)/4*3+1. * Destination is string terminated. * This function is deprecated, coded stream can contain terminator character * use overloaded b64Encode instead. * @return destination buffer * @param source source string * @param dest   destination octet buffer * @param size   destination buffer size */__EXPORT char* b64Encode(const char *source, char *dest, size_t size);/** @relates URLStream * Encode a octet stream using base64 coding. * Destination size should be at least (srcsize+2)/3*4+1. * Destination will be a string, so is always terminated  * (unless you pass dstsize == 0). * @return size of string written not counting terminator * @param src     source buffer * @param srcsize source buffer size * @param dst     destination buffer * @param dstsize destination buffer size */__EXPORT size_t b64Encode(const unsigned char *src, size_t srcsize,	       char *dst, size_t dstsize);/** @relates URLStream * Decode a string using base64 coding. * Destination size should be at least strlen(src)/4*3. * Destination are not string terminated (It's just a octet stream). * @return number of octets written into destination buffer * @param src     source string * @param dst     destination octet buffer * @param dstsize destination buffer size */__EXPORT size_t b64Decode(const char *src,		unsigned char *dst, size_t dstsize);/** @relates URLStream * Encode a STL string using base64 coding into a STL string * @return base 64 encoded string * @param src source string */__EXPORT String b64Encode(const String& src);/** @relates URLStream * Decode a STL string using base64 coding into an STL String. * Destination size should be at least strlen(src)/4*3. * Destination are not string terminated (It's just a octet stream). * @return decoded string * @param src     source string */__EXPORT String b64Decode(const String& src);/** @relates URLStream * Encode a octet stream using base64 coding into a STL string * @return base 64 encoded string * @param src     source buffer * @param srcsize source buffer size */__EXPORT String b64Encode(const unsigned char *src, size_t srcsize);/** @relates URLStream * Decode a string using base64 coding. * Destination size should be at least strlen(src)/4*3. * Destination are not string terminated (It's just a octet stream). * @return number of octets written into destination buffer * @param src     source string * @param dst     destination octet buffer * @param dstsize destination buffer size */__EXPORT size_t b64Decode(const String& src,		unsigned char *dst, size_t dstsize);#ifdef	CCXX_NAMESPACES}#endif#endif/** EMACS ** * Local variables: * mode: c++ * c-basic-offset: 8 * End: */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黑人精品欧美一区二区蜜桃| 日韩在线播放一区二区| 国产成人高清视频| 国产亚洲欧洲一区高清在线观看| 精品亚洲国内自在自线福利| 欧美精品一区二区精品网| 极品美女销魂一区二区三区| 久久久99精品免费观看不卡| 国产成人综合自拍| 1024精品合集| 欧美日韩激情一区二区三区| 日韩不卡一区二区| 国产亚洲精品精华液| 成人性生交大片免费看中文| 亚洲天堂a在线| 在线成人高清不卡| 国产麻豆精品theporn| 日韩美女久久久| 欧美精品日韩一本| 成人黄动漫网站免费app| 一区二区在线观看不卡| 精品三级在线看| a亚洲天堂av| 日本视频免费一区| 国产精品免费视频观看| 欧美探花视频资源| 国产一区二区日韩精品| 一区二区免费看| 日韩精品在线一区| 91在线国内视频| 美腿丝袜一区二区三区| 亚洲欧美一区二区三区国产精品 | 久久综合999| 色噜噜狠狠色综合欧洲selulu| 免费看欧美美女黄的网站| 国产精品国产三级国产aⅴ入口 | 菠萝蜜视频在线观看一区| 图片区日韩欧美亚洲| 国产亚洲一二三区| 3751色影院一区二区三区| 成人精品鲁一区一区二区| 午夜精品国产更新| 亚洲人成网站精品片在线观看| 日韩区在线观看| 日本高清免费不卡视频| 国产乱国产乱300精品| 午夜精品爽啪视频| 亚洲视频一区二区免费在线观看| 欧美成人video| 欧美视频一区二区三区| 成人av网站免费| 久久国产尿小便嘘嘘| 午夜一区二区三区视频| 1000部国产精品成人观看| 精品999久久久| 日韩欧美中文一区二区| 欧美日本视频在线| 在线观看日韩高清av| av高清久久久| 成人毛片在线观看| 国产毛片精品视频| 狠狠色丁香婷综合久久| 美女一区二区三区| 秋霞电影一区二区| 日韩1区2区3区| 水蜜桃久久夜色精品一区的特点| 亚洲欧美视频在线观看视频| 国产精品毛片久久久久久| 日本一区二区在线不卡| 久久久91精品国产一区二区精品| 日韩精品在线一区二区| 日韩精品一区二区三区四区视频| 日韩视频免费观看高清在线视频| 欧美一区三区二区| 欧美卡1卡2卡| 日韩欧美综合一区| 精品欧美一区二区久久| 精品国产乱码久久久久久老虎| 欧美xxxxxxxx| 久久久久久日产精品| 久久久久成人黄色影片| 国产免费观看久久| 中文字幕一区二区三区av| 亚洲丝袜精品丝袜在线| 一区二区三区日韩欧美| 亚洲一区中文日韩| 亚洲第一福利一区| 欧美a级理论片| 国产综合成人久久大片91| 国产精品影视在线观看| 成人久久视频在线观看| 99re热视频这里只精品| 欧美中文字幕一二三区视频| 欧美精品一级二级| 26uuu亚洲| 亚洲人成伊人成综合网小说| 亚洲第一成年网| 看片的网站亚洲| 成人免费看黄yyy456| 在线这里只有精品| 日韩视频一区二区| 国产精品久久久久久久久久久免费看 | 欧美精品一级二级| 日韩丝袜美女视频| 国产精品欧美综合在线| 亚洲一区在线看| 国内精品国产三级国产a久久| 成人精品视频.| 欧美日韩国产小视频在线观看| 亚洲图片欧美视频| 麻豆专区一区二区三区四区五区| 韩国一区二区在线观看| 91在线无精精品入口| 5858s免费视频成人| 国产亚洲美州欧州综合国| 亚洲区小说区图片区qvod| 日韩黄色片在线观看| 国产成人精品影视| 欧美精品xxxxbbbb| 亚洲欧美怡红院| 日韩av一二三| 91性感美女视频| 欧美成人a在线| 一区二区三区 在线观看视频| 国内一区二区在线| 欧美系列亚洲系列| 国产精品色一区二区三区| 日本成人在线看| 91丨porny丨户外露出| 日韩精品一区二区在线| 一卡二卡欧美日韩| 懂色av中文字幕一区二区三区| 欧美日韩免费观看一区二区三区| 国产欧美日韩另类一区| 日韩av不卡一区二区| 色综合天天在线| 国产无一区二区| 精品一区中文字幕| 欧美日韩一区二区三区不卡| 亚洲欧美自拍偷拍色图| 国产自产v一区二区三区c| 欧美日韩国产一区二区三区地区| 综合网在线视频| 国产高清精品在线| 精品国产乱码久久久久久1区2区 | jizz一区二区| 精品国精品国产尤物美女| 日韩精品一区第一页| 91福利在线播放| 亚洲视频一区二区免费在线观看| 国产乱码精品1区2区3区| 日韩欧美国产一区二区在线播放| 亚洲高清不卡在线观看| 色老头久久综合| 亚洲美女一区二区三区| 成a人片国产精品| 久久精品亚洲国产奇米99| 久久av资源站| 日韩一区二区影院| 蜜桃精品在线观看| 日韩写真欧美这视频| 奇米影视在线99精品| 欧美一级爆毛片| 蜜桃精品视频在线观看| 日韩午夜av一区| 久久精品99国产精品| 日韩久久久精品| 久久精品国产亚洲a| 日韩三级电影网址| 国产一区二区三区蝌蚪| 国产亚洲欧美色| 波多野结衣在线一区| 中文字幕亚洲成人| 91小视频在线免费看| 伊人婷婷欧美激情| 欧美精品乱码久久久久久| 无码av免费一区二区三区试看| 这里只有精品99re| 精品亚洲成a人在线观看| 久久女同互慰一区二区三区| 福利一区二区在线观看| 国产精品福利一区| 色噜噜狠狠成人中文综合 | 精品三级在线看| 国产激情一区二区三区桃花岛亚洲| 久久久久国产成人精品亚洲午夜| 丁香亚洲综合激情啪啪综合| 国产精品美女视频| 在线观看视频一区二区| 日本中文字幕不卡| 久久嫩草精品久久久精品| 成人av手机在线观看| 亚洲欧美另类久久久精品2019| 欧美日韩午夜在线视频| 日本不卡高清视频| 国产精品午夜在线观看| 精品视频一区二区不卡| 激情综合色丁香一区二区| 国产精品国产三级国产| 欧美午夜精品久久久|