📄 http_8h-source.html
字号:
<a name="l00628"></a><a class="code" href="classPMultipartFormInfo.html#m0">00628</a> <a class="code" href="classPMIMEInfo.html">PMIMEInfo</a> <a class="code" href="classPMultipartFormInfo.html#m0">mime</a>;<a name="l00629"></a><a class="code" href="classPMultipartFormInfo.html#m1">00629</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPMultipartFormInfo.html#m1">body</a>;00630 };00631 00632 <a class="code" href="http_8h.html#a0">PARRAY</a>(PMultipartFormInfoArray, <a class="code" href="classPMultipartFormInfo.html">PMultipartFormInfo</a>);00633 00635 <span class="comment">// PHTTPConnectionInfo</span>00636 00637 <span class="keyword">class </span><a class="code" href="classPHTTPServer.html">PHTTPServer</a>;00638 <a name="l00643"></a><a class="code" href="classPHTTPConnectionInfo.html">00643</a> <span class="keyword">class </span><a class="code" href="classPHTTPConnectionInfo.html">PHTTPConnectionInfo</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00644 {00645 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPHTTPConnectionInfo.html">PHTTPConnectionInfo</a>, <a class="code" href="classPObject.html">PObject</a>)00646 <span class="keyword">public</span>:00647 <a class="code" href="classPHTTPConnectionInfo.html#a0">PHTTPConnectionInfo</a>();00648 <a name="l00649"></a><a class="code" href="classPHTTPConnectionInfo.html#a1">00649</a> <a class="code" href="classPHTTP.html#s42">PHTTP::Commands</a> <a class="code" href="classPHTTPConnectionInfo.html#a1">GetCommandCode</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n0">commandCode</a>; }<a name="l00650"></a><a class="code" href="classPHTTPConnectionInfo.html#a2">00650</a> <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPConnectionInfo.html#a2">GetCommandName</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n1">commandName</a>; }00651 <a name="l00652"></a><a class="code" href="classPHTTPConnectionInfo.html#a3">00652</a> <span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & <a class="code" href="classPHTTPConnectionInfo.html#a3">GetURL</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n2">url</a>; }00653 <a name="l00654"></a><a class="code" href="classPHTTPConnectionInfo.html#a4">00654</a> <span class="keyword">const</span> <a class="code" href="classPMIMEInfo.html">PMIMEInfo</a> & <a class="code" href="classPHTTPConnectionInfo.html#a4">GetMIME</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n3">mimeInfo</a>; }00655 <span class="keywordtype">void</span> <a class="code" href="classPHTTPConnectionInfo.html#a5">SetMIME</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & tag, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & value);00656 00657 BOOL <a class="code" href="classPHTTPConnectionInfo.html#a6">IsCompatible</a>(<span class="keywordtype">int</span> major, <span class="keywordtype">int</span> minor) <span class="keyword">const</span>;00658 <a name="l00659"></a><a class="code" href="classPHTTPConnectionInfo.html#a7">00659</a> BOOL <a class="code" href="classPHTTPConnectionInfo.html#a7">IsPersistant</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n4">isPersistant</a>; }<a name="l00660"></a><a class="code" href="classPHTTPConnectionInfo.html#a8">00660</a> BOOL <a class="code" href="classPHTTPConnectionInfo.html#a8">WasPersistant</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n5">wasPersistant</a>; }<a name="l00661"></a><a class="code" href="classPHTTPConnectionInfo.html#a9">00661</a> BOOL <a class="code" href="classPHTTPConnectionInfo.html#a9">IsProxyConnection</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n6">isProxyConnection</a>; }<a name="l00662"></a><a class="code" href="classPHTTPConnectionInfo.html#a10">00662</a> <span class="keywordtype">int</span> <a class="code" href="classPHTTPConnectionInfo.html#a10">GetMajorVersion</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n7">majorVersion</a>; }<a name="l00663"></a><a class="code" href="classPHTTPConnectionInfo.html#a11">00663</a> <span class="keywordtype">int</span> <a class="code" href="classPHTTPConnectionInfo.html#a11">GetMinorVersion</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n8">minorVersion</a>; }00664 <a name="l00665"></a><a class="code" href="classPHTTPConnectionInfo.html#a12">00665</a> <span class="keywordtype">long</span> <a class="code" href="classPHTTPConnectionInfo.html#a12">GetEntityBodyLength</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n10">entityBodyLength</a>; }00666 <a name="l00669"></a><a class="code" href="classPHTTPConnectionInfo.html#a13">00669</a> <a class="code" href="classPTimeInterval.html">PTimeInterval</a> <a class="code" href="classPHTTPConnectionInfo.html#a13">GetPersistenceTimeout</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n11">persistenceTimeout</a>; }00670 <a name="l00673"></a><a class="code" href="classPHTTPConnectionInfo.html#a14">00673</a> <span class="keywordtype">void</span> <a class="code" href="classPHTTPConnectionInfo.html#a14">SetPersistenceTimeout</a>(<span class="keyword">const</span> <a class="code" href="classPTimeInterval.html">PTimeInterval</a> & t) { <a class="code" href="classPHTTPConnectionInfo.html#n11">persistenceTimeout</a> = t; }00674 <a name="l00678"></a><a class="code" href="classPHTTPConnectionInfo.html#a15">00678</a> <span class="keywordtype">unsigned</span> <a class="code" href="classPHTTPConnectionInfo.html#a15">GetPersistenceMaximumTransations</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n12">persistenceMaximum</a>; }00679 <a name="l00683"></a><a class="code" href="classPHTTPConnectionInfo.html#a16">00683</a> <span class="keywordtype">void</span> <a class="code" href="classPHTTPConnectionInfo.html#a16">SetPersistenceMaximumTransations</a>(<span class="keywordtype">unsigned</span> m) { <a class="code" href="classPHTTPConnectionInfo.html#n12">persistenceMaximum</a> = m; }00684 <a name="l00685"></a><a class="code" href="classPHTTPConnectionInfo.html#a17">00685</a> <span class="keyword">const</span> PMultipartFormInfoArray & <a class="code" href="classPHTTPConnectionInfo.html#a17">GetMultipartFormInfo</a>()<span class="keyword"> const</span>00686 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n13">multipartFormInfoArray</a>; }00687 <a name="l00688"></a><a class="code" href="classPHTTPConnectionInfo.html#a18">00688</a> <span class="keywordtype">void</span> <a class="code" href="classPHTTPConnectionInfo.html#a18">ResetMultipartFormInfo</a>()00689 { <a class="code" href="classPHTTPConnectionInfo.html#n13">multipartFormInfoArray</a>.RemoveAll(); }00690 <a name="l00691"></a><a class="code" href="classPHTTPConnectionInfo.html#a19">00691</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPHTTPConnectionInfo.html#a19">GetEntityBody</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classPHTTPConnectionInfo.html#n9">entityBody</a>; }00692 00693 <span class="keyword">protected</span>:00694 BOOL <a class="code" href="classPHTTPConnectionInfo.html#b0">Initialise</a>(<a class="code" href="classPHTTPServer.html">PHTTPServer</a> & server, <a class="code" href="classPString.html">PString</a> & args);00695 <span class="keywordtype">void</span> <a class="code" href="classPHTTPConnectionInfo.html#b1">DecodeMultipartFormInfo</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & type, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPHTTPConnectionInfo.html#n9">entityBody</a>);00696 <a name="l00697"></a><a class="code" href="classPHTTPConnectionInfo.html#n0">00697</a> <a class="code" href="classPHTTP.html#s42">PHTTP::Commands</a> <a class="code" href="classPHTTPConnectionInfo.html#n0">commandCode</a>;<a name="l00698"></a><a class="code" href="classPHTTPConnectionInfo.html#n1">00698</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPHTTPConnectionInfo.html#n1">commandName</a>;<a name="l00699"></a><a class="code" href="classPHTTPConnectionInfo.html#n2">00699</a> <a class="code" href="classPURL.html">PURL</a> <a class="code" href="classPHTTPConnectionInfo.html#n2">url</a>;<a name="l00700"></a><a class="code" href="classPHTTPConnectionInfo.html#n3">00700</a> <a class="code" href="classPMIMEInfo.html">PMIMEInfo</a> <a class="code" href="classPHTTPConnectionInfo.html#n3">mimeInfo</a>;<a name="l00701"></a><a class="code" href="classPHTTPConnectionInfo.html#n4">00701</a> BOOL <a class="code" href="classPHTTPConnectionInfo.html#n4">isPersistant</a>;<a name="l00702"></a><a class="code" href="classPHTTPConnectionInfo.html#n5">00702</a> BOOL <a class="code" href="classPHTTPConnectionInfo.html#n5">wasPersistant</a>;<a name="l00703"></a><a class="code" href="classPHTTPConnectionInfo.html#n6">00703</a> BOOL <a class="code" href="classPHTTPConnectionInfo.html#n6">isProxyConnection</a>;<a name="l00704"></a><a class="code" href="classPHTTPConnectionInfo.html#n7">00704</a> <span class="keywordtype">int</span> <a class="code" href="classPHTTPConnectionInfo.html#n7">majorVersion</a>;<a name="l00705"></a><a class="code" href="classPHTTPConnectionInfo.html#n8">00705</a> <span class="keywordtype">int</span> <a class="code" href="classPHTTPConnectionInfo.html#n8">minorVersion</a>;<a name="l00706"></a><a class="code" href="classPHTTPConnectionInfo.html#n9">00706</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPHTTPConnectionInfo.html#n9">entityBody</a>; <span class="comment">// original entity body (POST only)</span><a name="l00707"></a><a class="code" href="classPHTTPConnectionInfo.html#n10">00707</a> <span class="keywordtype">long</span> <a class="code" href="classPHTTPConnectionInfo.html#n10">entityBodyLength</a>;<a name="l00708"></a><a class="code" href="classPHTTPConnectionInfo.html#n11">00708</a> <a class="code" href="classPTimeInterval.html">PTimeInterval</a> <a class="code" href="classPHTTPConnectionInfo.html#n11">persistenceTimeout</a>;<a name="l00709"></a><a class="code" href="classPHTTPConnectionInfo.html#n12">00709</a> <span class="keywordtype">unsigned</span> <a class="code" href="classPHTTPConnectionInfo.html#n12">persistenceMaximum</a>;<a name="l00710"></a><a class="code" href="classPHTTPConnectionInfo.html#n13">00710</a> PMultipartFormInfoArray <a class="code" href="classPHTTPConnectionInfo.html#n13">multipartFormInfoArray</a>;00711 <a name="l00712"></a><a class="code" href="classPHTTPConnectionInfo.html#l0">00712</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPHTTPServer.html">PHTTPServer</a>;00713 };00714 00715 00717 <span class="comment">// PHTTPServer</span>00718 <a name="l00731"></a><a class="code" href="classPHTTPServer.html">00731</a> <span class="keyword">class </span><a class="code" href="classPHTTPServer.html">PHTTPServer</a> : <span class="keyword">public</span> <a class="code" href="classPHTTP.html">PHTTP</a>00732 {00733 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPHTTPServer.html">PHTTPServer</a>, <a class="code" href="classPHTTP.html">PHTTP</a>)00734 00735 <span class="keyword">public</span>:00743 <a class="code" href="classPHTTPServer.html#a0">PHTTPServer</a>();00744 <a class="code" href="classPHTTPServer.html#a0">PHTTPServer</a>(00745 <span class="keyword">const</span> <a class="code" href="classPHTTPSpace.html">PHTTPSpace</a> & <a class="code" href="classPHTTPServer.html#n0">urlSpace</a> <span class="comment">// Name space to use for URLs received.</span>00746 );00747 00748 00749 <span class="comment">// New functions for class.</span>00755 <span class="comment"></span> <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPHTTPServer.html#a2">GetServerName</a>() <span class="keyword">const</span>;00756 <a name="l00762"></a><a class="code" href="classPHTTPServer.html#a3">00762</a> <a class="code" href="classPHTTPSpace.html">PHTTPSpace</a> & <a class="code" href="classPHTTPServer.html#a3">GetURLSpace</a>() { <span class="keywordflow">return</span> <a class="code" href="classPHTTPServer.html#n0">urlSpace</a>; }00763 00765 <span class="keywordtype">void</span> <a class="code" href="classPHTTPServer.html#a4">SetURLSpace</a>(00766 <span class="keyword">const</span> <a class="code" href="classPHTTPSpace.html">PHTTPSpace</a> & space <span class="comment">// New URL name space to use.</span>00767 );00768 00769 00779 <span class="keyword">virtual</span> BOOL <a class="code" href="classPHTTPServer.html#a5">ProcessCommand</a>();00780 00792 <span class="keyword">virtual</span> BOOL <a class="code" href="classPHTTPServer.html#a6">OnGET</a>(00793 <span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="comment">// Universal Resource Locator for document.</span>00794 <span class="keyword">const</span> <a class="code" href="classPMIMEInfo.html">PMIMEInfo</a> & info, <span class="comment">// Extra MIME information in command.</span>00795 <span class="keyword">const</span> <a class="code" href="classPHTTPConnectionInfo.html">PHTTPConnectionInfo</a> & conInfo00796 );00797 00798 00799 00811 <span class="keyword">virtual</span> BOOL <a class="code" href="classPHTTPServer.html#a7">OnHEAD</a>(00812 <span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="comment">// Universal Resource Locator for document.</span>00813 <span class="keyword">const</span> <a class="code" href="classPMIMEInfo.html">PMIMEInfo</a> & info, <span class="comment">// Extra MIME information in command.</span>00814 <span class="keyword">const</span> <a class="code" href="classPHTTPConnectionInfo.html">PHTTPConnectionInfo</a> & conInfo00815 );00816 00828 <span class="keyword">virtual</span> BOOL <a class="code" href="classPHTTPServer.html#a8">OnPOST</a>(00829 <span class="keyword">const</span> <a class="code" href="classPURL.html">PURL</a> & url, <span class="comment">// Universal Resource Locator for document.</span>00830 <span class="keyword">const</span> <a class="code" href="classPMIMEInfo.html">PMIMEInfo</a> & info, <span class="comment">// Extra MIME information in command.</span>00831 <span class="keyword">const</span> <a class="code" href="classPStringToString.html">PStringToString</a> & data, <span class="comment">// Variables provided in the POST data.</span>00832 <span class="keyword">const</span> <a class="code" href="classPHTTPConnectionInfo.html">PHTTPConnectionInfo</a> & conInfo00833 );00834 00847 <span class="keyword">virtual</span> BOOL <a class="code" href="classPHTTPServer.html#a9">OnProxy</a>(00848 <span class="keyword">const</span> <a class="code" href="classPHTTPConnectionInfo.html">PHTTPConnectionInfo</a> & conInfo00849 );00850 00851 00858 <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPHTTPServer.html#a10">ReadEntityBody</a>();00859 00865 <span class="keyword">virtual</span> BOOL <a class="code" href="classPHTTPServer.html#a11">OnUnknown</a>(00866 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> &
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -