构造函数
GioProxyAddressnew
自:2.26
声明 [src]
GSocketAddress*
g_proxy_address_new (
GInetAddress* inetaddr,
guint16 port,
const gchar* protocol,
const gchar* dest_hostname,
guint16 dest_port,
const gchar* username,
const gchar* password
)
描述 [src]
为inetaddr创建一个新的通过dest_hostname和dest_port隧道传输数据的protocol的GProxyAddress。
(注意,此方法不设置GProxyAddress:uri或GProxyAddress:destination-protocol字段;如果您想设置这些字段,请直接使用g_object_new()。)
自:2.26
参数
inetaddr-
类型:
GInetAddress代理服务器
GInetAddress。数据归函数调用者所有。 port-
类型:
guint16代理服务器端口。
protocol-
类型:
const gchar*要支持的代理协议,小写(如 socks, http)。
数据归函数调用者所有。 值是一个以空字符终止的UTF-8字符串。 dest_hostname-
类型:
const gchar*代理应该隧道到目的地主机名。
数据归函数调用者所有。 值是一个以空字符终止的UTF-8字符串。 dest_port-
类型:
guint16要隧道的目的地端口。
username-
类型:
const gchar*用于身份验证代理服务器的用户名(或
NULL)。参数可以是 NULL。数据归函数调用者所有。 值是一个以空字符终止的UTF-8字符串。 password-
类型:
const gchar*用于身份验证代理服务器的密码(或
NULL)。参数可以是 NULL。数据归函数调用者所有。 值是一个以空字符终止的UTF-8字符串。
返回值
类型: GSocketAddress
一个新创建的GProxyAddress。
| 函数调用者拥有数据,并负责释放它。 |