?? url.h
字號:
#ifndef _URL_H_030728_#define _URL_H_030728_#include <string>const int URL_LEN = 256;using namespace std;enum url_scheme { SCHEME_HTTP, SCHEME_FTP, SCHEME_INVALID};const int DEFAULT_HTTP_PORT = 80;const int DEFAULT_FTP_PORT = 21;class CUrl{public: string m_sUrl; /* Original URL */ enum url_scheme m_eScheme; /* URL scheme */ string m_sHost; /* Extracted hostname */ int m_nPort; /* Port number */ /* URL components (URL-quoted). */ string m_sPath, m_sParams, m_sQuery, m_sFragment; /* Extracted path info (unquoted). */ string m_sDir, m_sFile; /* Username and password (unquoted). */ string m_sUser, m_sPasswd;public: CUrl(); ~CUrl(); bool ParseUrl(string strUrl);private: void ParseScheme (const char *url);};#endif /* _URL_H_030728_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -