18
27
<li>the protocol name, such as "http" or "ftp"</li>
19
28
<li>the URL being requested</li>
21
<p>The destination host name is the host in the connection in the case of outgoing connection sockets. It is the <tt>hostName</tt> parameter passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>() or the host component of a URL requested with <a href="qnetworkrequest.html">QNetworkRequest</a>.</p>
22
<p>The destination port number is the requested port to connect to in the case of outgoing sockets, while the local port number is the port the socket wishes to use locally before attempting the external connection. In most cases, the local port number is used by listening sockets only (<a href="qtcpsocket.html">QTcpSocket</a>) or by datagram sockets (<a href="qudpsocket.html">QUdpSocket</a>).</p>
23
<p>The protocol name is an arbitrary string that indicates the type of connection being attempted. For example, it can match the scheme of a URL, like "http", "https" and "ftp". In most cases, the proxy selection will not change depending on the protocol, but this information is provided in case a better choice can be made, like choosing an caching HTTP proxy for HTTP-based connections, but a more powerful SOCKSv5 proxy for all others.</p>
24
<p>Some of the criteria may not make sense in all of the types of query. The following table lists the criteria that are most commonly used, according to the type of query.</p>
25
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
26
<thead><tr class="qt-style" valign="top"><th>Query type</th><th>Description</th></tr></thead>
27
<tr class="odd" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">TcpSocket</a></td><td>Normal sockets requesting a connection to a remote server, like <a href="qtcpsocket.html">QTcpSocket</a>. The peer hostname and peer port match the values passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>(). The local port is usually -1, indicating the socket has no preference in which port should be used. The URL component is not used.</td></tr>
28
<tr class="even" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">UdpSocket</a></td><td>Datagram-based sockets, which can both send and receive. The local port, remote host or remote port fields can all be used or be left unused, depending on the characteristics of the socket. The URL component is not used.</td></tr>
29
<tr class="odd" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">TcpServer</a></td><td>Passive server sockets that listen on a port and await incoming connections from the network. Normally, only the local port is used, but the remote address could be used in specific circumstances, for example to indicate which remote host a connection is expected from. The URL component is not used.</td></tr>
30
<tr class="even" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">UrlRequest</a></td><td>A more high-level request, such as those coming from <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>. These requests will inevitably use an outgoing TCP socket, but the this query type is provided to indicate that more detailed information is present in the URL component. For ease of implementation, the URL's host and port are set as the destination address.</td></tr>
32
<p>It should be noted that any of the criteria may be missing or unknown (an empty <a href="qstring.html">QString</a> for the hostname or protocol name, -1 for the port numbers). If that happens, the functions executing the query should make their best guess or apply some implementation-defined default values.</p>
33
<p>See also <a href="qnetworkproxy.html">QNetworkProxy</a>, <a href="qnetworkproxyfactory.html">QNetworkProxyFactory</a>, <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>, and <a href="qabstractsocket.html#setProxy">QAbstractSocket.setProxy</a>().</p>
30
<p>The destination host name is the host in the connection in the
31
case of outgoing connection sockets. It is the <tt>hostName</tt>
32
parameter passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>()
33
or the host component of a URL requested with <a href="qnetworkrequest.html">QNetworkRequest</a>.</p>
34
<p>The destination port number is the requested port to connect to
35
in the case of outgoing sockets, while the local port number is the
36
port the socket wishes to use locally before attempting the
37
external connection. In most cases, the local port number is used
38
by listening sockets only (<a href="qtcpsocket.html">QTcpSocket</a>) or by datagram sockets (<a href="qudpsocket.html">QUdpSocket</a>).</p>
39
<p>The protocol name is an arbitrary string that indicates the type
40
of connection being attempted. For example, it can match the scheme
41
of a URL, like "http", "https" and "ftp". In most cases, the proxy
42
selection will not change depending on the protocol, but this
43
information is provided in case a better choice can be made, like
44
choosing an caching HTTP proxy for HTTP-based connections, but a
45
more powerful SOCKSv5 proxy for all others.</p>
46
<p>Some of the criteria may not make sense in all of the types of
47
query. The following table lists the criteria that are most
48
commonly used, according to the type of query.</p>
49
<table class="generic">
51
<tr class="qt-style topAlign">
56
<tr class="odd topAlign">
58
<p><a href="qnetworkproxyquery.html#QueryType-enum">TcpSocket</a></p>
61
<p>Normal sockets requesting a connection to a remote server, like
62
<a href="qtcpsocket.html">QTcpSocket</a>. The peer hostname and
63
peer port match the values passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>().
64
The local port is usually -1, indicating the socket has no
65
preference in which port should be used. The URL component is not
69
<tr class="even topAlign">
71
<p><a href="qnetworkproxyquery.html#QueryType-enum">UdpSocket</a></p>
74
<p>Datagram-based sockets, which can both send and receive. The
75
local port, remote host or remote port fields can all be used or be
76
left unused, depending on the characteristics of the socket. The
77
URL component is not used.</p>
80
<tr class="odd topAlign">
82
<p><a href="qnetworkproxyquery.html#QueryType-enum">TcpServer</a></p>
85
<p>Passive server sockets that listen on a port and await incoming
86
connections from the network. Normally, only the local port is
87
used, but the remote address could be used in specific
88
circumstances, for example to indicate which remote host a
89
connection is expected from. The URL component is not used.</p>
92
<tr class="even topAlign">
94
<p><a href="qnetworkproxyquery.html#QueryType-enum">UrlRequest</a></p>
97
<p>A more high-level request, such as those coming from <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>. These
98
requests will inevitably use an outgoing TCP socket, but the this
99
query type is provided to indicate that more detailed information
100
is present in the URL component. For ease of implementation, the
101
URL's host and port are set as the destination address.</p>
105
<p>It should be noted that any of the criteria may be missing or
106
unknown (an empty <a href="qstring.html">QString</a> for the
107
hostname or protocol name, -1 for the port numbers). If that
108
happens, the functions executing the query should make their best
109
guess or apply some implementation-defined default values.</p>
34
110
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="QueryType-enum" />QNetworkProxyQuery.QueryType</h3><p>Describes the type of one <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> query.</p>
35
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
36
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
37
<tr><td valign="top"><tt>QNetworkProxyQuery.TcpSocket</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">a normal, outgoing TCP socket</td></tr>
38
<tr><td valign="top"><tt>QNetworkProxyQuery.UdpSocket</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">a datagram-based UDP socket, which could send to multiple destinations</td></tr>
39
<tr><td valign="top"><tt>QNetworkProxyQuery.TcpServer</tt></td><td align="center" valign="top"><tt>100</tt></td><td valign="top">a TCP server that listens for incoming connections from the network</td></tr>
40
<tr><td valign="top"><tt>QNetworkProxyQuery.UrlRequest</tt></td><td align="center" valign="top"><tt>101</tt></td><td valign="top">a more complex request which involves loading of a URL</td></tr>
111
<table class="valuelist">
116
<th class="tblConst">Constant</th>
117
<th class="tblval">Value</th>
118
<th class="tbldscr">Description</th>
121
<td class="topAlign"><tt>QNetworkProxyQuery.TcpSocket</tt></td>
122
<td class=" topAlign"><tt>0</tt></td>
123
<td class="topAlign">a normal, outgoing TCP socket</td>
126
<td class="topAlign"><tt>QNetworkProxyQuery.UdpSocket</tt></td>
127
<td class=" topAlign"><tt>1</tt></td>
128
<td class="topAlign">a datagram-based UDP socket, which could send
129
to multiple destinations</td>
132
<td class="topAlign"><tt>QNetworkProxyQuery.TcpServer</tt></td>
133
<td class=" topAlign"><tt>100</tt></td>
134
<td class="topAlign">a TCP server that listens for incoming
135
connections from the network</td>
138
<td class="topAlign"><tt>QNetworkProxyQuery.UrlRequest</tt></td>
139
<td class=" topAlign"><tt>101</tt></td>
140
<td class="topAlign">a more complex request which involves loading
42
144
<p>See also <a href="qnetworkproxyquery.html#queryType">queryType</a>() and <a href="qnetworkproxyquery.html#setQueryType">setQueryType</a>().</p>
43
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QNetworkProxyQuery" />QNetworkProxyQuery.__init__ (<i>self</i>)</h3><p>Constructs a default <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object. By default, the query type will be <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>.</p>
44
<h3 class="fn"><a name="QNetworkProxyQuery-2" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qurl.html">QUrl</a>, <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> <i>type</i> = QNetworkProxyQuery.UrlRequest)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> with the URL <i>requestUrl</i> and sets the query type to <i>queryType</i>.</p>
45
<p>See also <a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
46
<h3 class="fn"><a name="QNetworkProxyQuery-3" />QNetworkProxyQuery.__init__ (<i>self</i>, QString, int, QString <i>protocolTag</i> = QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> <i>type</i> = QNetworkProxyQuery.TcpSocket)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type <i>queryType</i> and sets the protocol tag to be <i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a> queries, because it sets the peer hostname to <i>hostname</i> and the peer's port number to <i>port</i>.</p>
47
<h3 class="fn"><a name="QNetworkProxyQuery-4" />QNetworkProxyQuery.__init__ (<i>self</i>, int, QString <i>protocolTag</i> = QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> <i>type</i> = QNetworkProxyQuery.TcpServer)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type <i>queryType</i> and sets the protocol tag to be <i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a> queries because it sets the local port number to <i>bindPort</i>.</p>
48
<p>Note that <i>bindPort</i> is of type quint16 to indicate the exact port number that is requested. The value of -1 (unknown) is not allowed in this context.</p>
145
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QNetworkProxyQuery" />QNetworkProxyQuery.__init__ (<i>self</i>)</h3><p>Constructs a default <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object. By
146
default, the query type will be <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>.</p>
149
<h3 class="fn"><a name="QNetworkProxyQuery-2" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qurl.html">QUrl</a>, <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> <i>type</i> = QNetworkProxyQuery.UrlRequest)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> with the URL
150
<i>requestUrl</i> and sets the query type to <i>queryType</i>.</p>
151
<p>See also <a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and
152
<a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
155
<h3 class="fn"><a name="QNetworkProxyQuery-3" />QNetworkProxyQuery.__init__ (<i>self</i>, QString, int, QString <i>protocolTag</i> = QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> <i>type</i> = QNetworkProxyQuery.TcpSocket)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type
156
<i>queryType</i> and sets the protocol tag to be
157
<i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>
158
queries, because it sets the peer hostname to <i>hostname</i> and
159
the peer's port number to <i>port</i>.</p>
162
<h3 class="fn"><a name="QNetworkProxyQuery-4" />QNetworkProxyQuery.__init__ (<i>self</i>, int, QString <i>protocolTag</i> = QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> <i>type</i> = QNetworkProxyQuery.TcpServer)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type
163
<i>queryType</i> and sets the protocol tag to be
164
<i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>
165
queries because it sets the local port number to
167
<p>Note that <i>bindPort</i> is of type quint16 to indicate the
168
exact port number that is requested. The value of -1 (unknown) is
169
not allowed in this context.</p>
49
170
<p>See also <a href="qnetworkproxyquery.html#localPort">localPort</a>().</p>
50
<h3 class="fn"><a name="QNetworkProxyQuery-5" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object that is a copy of <i>other</i>.</p>
51
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/~QNetworkProxyQuery" />
52
<h3 class="fn"><a name="localPort" />int QNetworkProxyQuery.localPort (<i>self</i>)</h3><p>Returns the port number of the socket that will accept incoming packets from remote servers or -1 if the port is not known.</p>
53
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
54
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/peerHostName" />
55
<h3 class="fn"><a name="peerHostName" />QString QNetworkProxyQuery.peerHostName (<i>self</i>)</h3><p>Returns the host name or IP address being of the outgoing connection being requested, or an empty string if the remote hostname is not known.</p>
56
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>, this function returns the host component of the URL being requested.</p>
173
<h3 class="fn"><a name="QNetworkProxyQuery-5" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object that is a
174
copy of <i>other</i>.</p>
177
<h3 class="fn"><a name="localPort" />int QNetworkProxyQuery.localPort (<i>self</i>)</h3><p>Returns the port number of the socket that will accept incoming
178
packets from remote servers or -1 if the port is not known.</p>
179
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and
180
<a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
183
<h3 class="fn"><a name="peerHostName" />QString QNetworkProxyQuery.peerHostName (<i>self</i>)</h3><p>Returns the host name or IP address being of the outgoing
184
connection being requested, or an empty string if the remote
185
hostname is not known.</p>
186
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>,
187
this function returns the host component of the URL being
57
189
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#localPort">localPort</a>(), and <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
58
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/peerPort" />
59
<h3 class="fn"><a name="peerPort" />int QNetworkProxyQuery.peerPort (<i>self</i>)</h3><p>Returns the port number for the outgoing request or -1 if the port number is not known.</p>
60
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>, this function returns the port number of the URL being requested. In general, frameworks will fill in the port number from their default values.</p>
192
<h3 class="fn"><a name="peerPort" />int QNetworkProxyQuery.peerPort (<i>self</i>)</h3><p>Returns the port number for the outgoing request or -1 if the
193
port number is not known.</p>
194
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>,
195
this function returns the port number of the URL being requested.
196
In general, frameworks will fill in the port number from their
61
198
<p>See also <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#localPort">localPort</a>(), and <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>().</p>
62
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/protocolTag" />
63
<h3 class="fn"><a name="protocolTag" />QString QNetworkProxyQuery.protocolTag (<i>self</i>)</h3><p>Returns the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object, or an empty <a href="qstring.html">QString</a> in case the protocol tag is unknown.</p>
64
<p>In the case of queries of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>, this function returns the value of the scheme component of the URL.</p>
65
<p>See also <a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a>() and <a href="qnetworkproxyquery.html#url">url</a>().</p>
66
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/queryType" />
201
<h3 class="fn"><a name="protocolTag" />QString QNetworkProxyQuery.protocolTag (<i>self</i>)</h3><p>Returns the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object, or an
202
empty <a href="qstring.html">QString</a> in case the protocol tag
204
<p>In the case of queries of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>,
205
this function returns the value of the scheme component of the
207
<p>See also <a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a>() and
208
<a href="qnetworkproxyquery.html#url">url</a>().</p>
67
211
<h3 class="fn"><a name="queryType" /><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> QNetworkProxyQuery.queryType (<i>self</i>)</h3><p>Returns the query type.</p>
68
212
<p>See also <a href="qnetworkproxyquery.html#setQueryType">setQueryType</a>().</p>
69
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setLocalPort" />
70
<h3 class="fn"><a name="setLocalPort" />QNetworkProxyQuery.setLocalPort (<i>self</i>, int)</h3><p>Sets the port number that the socket wishes to use locally to accept incoming packets from remote servers to <i>port</i>. The local port is most often used with the <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a> and <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a> query types.</p>
71
<p>Valid values are 0 to 65535 (with 0 indicating that any port number will be acceptable) or -1, which means the local port number is unknown or not applicable.</p>
72
<p>In some circumstances, for special protocols, it's the local port number can also be used with a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>. When that happens, the socket is indicating it wishes to use the port number <i>port</i> when connecting to a remote host.</p>
73
<p>See also <a href="qnetworkproxyquery.html#localPort">localPort</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
74
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setPeerHostName" />
75
<h3 class="fn"><a name="setPeerHostName" />QNetworkProxyQuery.setPeerHostName (<i>self</i>, QString)</h3><p>Sets the hostname of the outgoing connection being requested to <i>hostname</i>. An empty hostname can be used to indicate that the remote host is unknown.</p>
76
<p>The peer host name can also be used to indicate the expected source address of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a> or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a> query types.</p>
77
<p>See also <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
78
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setPeerPort" />
79
<h3 class="fn"><a name="setPeerPort" />QNetworkProxyQuery.setPeerPort (<i>self</i>, int)</h3><p>Sets the requested port number for the outgoing connection to be <i>port</i>. Valid values are 1 to 65535, or -1 to indicate that the remote port number is unknown.</p>
80
<p>The peer port number can also be used to indicate the expected port number of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a> or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a> query types.</p>
81
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
82
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setProtocolTag" />
83
<h3 class="fn"><a name="setProtocolTag" />QNetworkProxyQuery.setProtocolTag (<i>self</i>, QString)</h3><p>Sets the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be <i>protocolTag</i>.</p>
84
<p>The protocol tag is an arbitrary string that indicates which protocol is being talked over the socket, such as "http", "xmpp", "telnet", etc. The protocol tag is used by the backend to return a request that is more specific to the protocol in question: for example, a HTTP connection could be use a caching HTTP proxy server, while all other connections use a more powerful SOCKSv5 proxy server.</p>
215
<h3 class="fn"><a name="setLocalPort" />QNetworkProxyQuery.setLocalPort (<i>self</i>, int)</h3><p>Sets the port number that the socket wishes to use locally to
216
accept incoming packets from remote servers to <i>port</i>. The
217
local port is most often used with the <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a>
218
and <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a>
220
<p>Valid values are 0 to 65535 (with 0 indicating that any port
221
number will be acceptable) or -1, which means the local port number
222
is unknown or not applicable.</p>
223
<p>In some circumstances, for special protocols, it's the local
224
port number can also be used with a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>.
225
When that happens, the socket is indicating it wishes to use the
226
port number <i>port</i> when connecting to a remote host.</p>
227
<p>See also <a href="qnetworkproxyquery.html#localPort">localPort</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and
228
<a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
231
<h3 class="fn"><a name="setPeerHostName" />QNetworkProxyQuery.setPeerHostName (<i>self</i>, QString)</h3><p>Sets the hostname of the outgoing connection being requested to
232
<i>hostname</i>. An empty hostname can be used to indicate that the
233
remote host is unknown.</p>
234
<p>The peer host name can also be used to indicate the expected
235
source address of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a>
236
or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a>
238
<p>See also <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and
239
<a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
242
<h3 class="fn"><a name="setPeerPort" />QNetworkProxyQuery.setPeerPort (<i>self</i>, int)</h3><p>Sets the requested port number for the outgoing connection to be
243
<i>port</i>. Valid values are 1 to 65535, or -1 to indicate that
244
the remote port number is unknown.</p>
245
<p>The peer port number can also be used to indicate the expected
246
port number of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a>
247
or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a>
249
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>(),
250
and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
253
<h3 class="fn"><a name="setProtocolTag" />QNetworkProxyQuery.setProtocolTag (<i>self</i>, QString)</h3><p>Sets the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be
254
<i>protocolTag</i>.</p>
255
<p>The protocol tag is an arbitrary string that indicates which
256
protocol is being talked over the socket, such as "http", "xmpp",
257
"telnet", etc. The protocol tag is used by the backend to return a
258
request that is more specific to the protocol in question: for
259
example, a HTTP connection could be use a caching HTTP proxy
260
server, while all other connections use a more powerful SOCKSv5
85
262
<p>See also <a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>().</p>
86
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setQueryType" />
87
265
<h3 class="fn"><a name="setQueryType" />QNetworkProxyQuery.setQueryType (<i>self</i>, <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>)</h3><p>Sets the query type of this object to be <i>type</i>.</p>
88
266
<p>See also <a href="qnetworkproxyquery.html#queryType">queryType</a>().</p>
89
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setUrl" />
90
<h3 class="fn"><a name="setUrl" />QNetworkProxyQuery.setUrl (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Sets the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be <i>url</i>. Setting the URL will also set the protocol tag, the remote host name and port number. This is done so as to facilitate the implementation of the code that determines the proxy server to be used.</p>
91
<p>See also <a href="qnetworkproxyquery.html#url">url</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
92
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/url" />
93
<h3 class="fn"><a name="url" /><a href="qurl.html">QUrl</a> QNetworkProxyQuery.url (<i>self</i>)</h3><p>Returns the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object in case of a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>.</p>
269
<h3 class="fn"><a name="setUrl" />QNetworkProxyQuery.setUrl (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Sets the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be
270
<i>url</i>. Setting the URL will also set the protocol tag, the
271
remote host name and port number. This is done so as to facilitate
272
the implementation of the code that determines the proxy server to
274
<p>See also <a href="qnetworkproxyquery.html#url">url</a>(),
275
<a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(),
276
and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
279
<h3 class="fn"><a name="url" /><a href="qurl.html">QUrl</a> QNetworkProxyQuery.url (<i>self</i>)</h3><p>Returns the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object in case of
280
a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>.</p>
94
281
<p>See also <a href="qnetworkproxyquery.html#setUrl">setUrl</a>().</p>
95
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/operator!=" />
96
<h3 class="fn"><a name="__eq__" />bool QNetworkProxyQuery.__eq__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><h3 class="fn"><a name="__ne__" />bool QNetworkProxyQuery.__ne__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.7 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.3</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'
284
<h3 class="fn"><a name="__eq__" />bool QNetworkProxyQuery.__eq__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><h3 class="fn"><a name="__ne__" />bool QNetworkProxyQuery.__ne__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.8.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.7.0</td></tr></table></div></address></body></html>
b'\\ No newline at end of file'