GObject.Object
Soup.Address
Import line: | Soup = imports.gi.Soup; |
GIR File: | Soup-2.4.gir |
C documentation: | SoupAddress |
Class : | Address |
Implements: | Gio.SocketConnectable |
Extends: | GObject.Object |
Properties | Defined By | |
---|---|---|
family : Soup.AddressFamily
|
Soup.Address | |
name : String
|
Soup.Address | |
parent : GObject.Object
read only
|
Soup.Address | |
physical : String
read only
|
Soup.Address | |
port : gint32
|
Soup.Address | |
sockaddr : void*
|
Soup.Address |
Method / Constructor | Defined By | |
---|---|---|
new Soup.Address
(Object properties)
Create a new Soup.Address
Create a new Soup.Address
|
||
Create a new Soup.Address
Create a new Soup.Address
|
||
Create a new Soup.Address
Create a new Soup.Address
|
||
Create a new Soup.Address
Create a new Soup.Address
|
||
Tests if addr1 and addr2 have the same IP address.
Tests if addr1 and addr2 have the same IP address. This method
can be used with soup_address_hash_by_ip() to create a GHashTable that hashes on IP address. This would be used to distinguish hosts in situations where different virtual hosts on the same IP address should be considered the same. Eg, if "www.example.com" and "www.example.net" have the same IP address, then a single SoupConnection can be used to talk to either of them. See also soup_address_equal_by_name(), which compares by name rather than by IP address. address.
|
Soup.Address | |
Tests if addr1 and addr2 have the same "name".
Tests if addr1 and addr2 have the same "name". This method can be
used with soup_address_hash_by_name() to create a GHashTable that hashes on address "names". Comparing by name normally means comparing the addresses by their hostnames. But if the address was originally created using an IP address literal, then it will be compared by that instead. In particular, if "www.example.com" has the IP address 10.0.0.1, and addr1 was created with the name "www.example.com" and addr2 was created with the name "10.0.0.1", then they will compare as unequal for purposes of soup_address_equal_by_name(). This would be used to distinguish hosts in situations where different virtual hosts on the same IP address should be considered different. Eg, for purposes of HTTP authentication or cookies, two hosts with the same IP address but different names are considered to be different hosts. See also soup_address_equal_by_ip(), which compares by IP address rather than by name.
|
Soup.Address | |
Soup.Address | ||
Soup.Address | ||
enumerate
()
:
Gio.SocketAddressEnumerator
Creates a GSocketAddressEnumerator for connectable.
Creates a GSocketAddressEnumerator for connectable.
|
Gio.SocketConnectable | |
get_gsockaddr
()
:
Gio.SocketAddress
Creates a new GSocketAddress corresponding to addr (which is assumed
to only have one socket address associated with it).
Creates a new GSocketAddress corresponding to addr (which is assumed
to only have one socket address associated with it).
|
Soup.Address | |
get_name
()
:
String
Returns the hostname associated with addr.
Returns the hostname associated with addr.
This method is not thread-safe; if you call it while addr is being resolved in another thread, it may return garbage. You can use soup_address_is_resolved() to safely test whether or not an address is resolved before fetching its name or address.
|
Soup.Address | |
get_physical
()
:
String
Returns the physical address associated with addr as a string.
Returns the physical address associated with addr as a string.
(Eg, "127.0.0.1"). If the address is not yet known, returns NULL. This method is not thread-safe; if you call it while addr is being resolved in another thread, it may return garbage. You can use soup_address_is_resolved() to safely test whether or not an address is resolved before fetching its name or address.
|
Soup.Address | |
get_port
()
:
guint32
Returns the port associated with addr.
Returns the port associated with addr.
|
Soup.Address | |
Returns the sockaddr associated with addr, with its length in
*len.
Returns the sockaddr associated with addr, with its length in
*len. If the sockaddr is not yet known, returns NULL. This method is not thread-safe; if you call it while addr is being resolved in another thread, it may return garbage. You can use soup_address_is_resolved() to safely test whether or not an address is resolved before fetching its name or address.
|
Soup.Address | |
is_resolved
()
:
gboolean
Tests if addr has already been resolved.
Tests if addr has already been resolved. Unlike the other
SoupAddress "get" methods, this is safe to call when addr might be being resolved in another thread.
|
Soup.Address | |
proxy_enumerate
()
:
Gio.SocketAddressEnumerator
Creates a GSocketAddressEnumerator for connectable that will
return GProxyAddresses for addresses that you must connect to via a proxy.
Creates a GSocketAddressEnumerator for connectable that will
return GProxyAddresses for addresses that you must connect to via a proxy. If connectable does not implement g_socket_connectable_proxy_enumerate(), this will fall back to calling g_socket_connectable_enumerate().
|
Gio.SocketConnectable | |
resolve_async
(MainContext async_context, Cancellable cancellable, Function callback, void* user_data)
:
none
Asynchronously resolves the missing half of addr (its IP address
if it was created with soup_address_new(), or its hostname if it was created with soup_address_new_from_sockaddr() or soup_address_new_any().
Asynchronously resolves the missing half of addr (its IP address
if it was created with soup_address_new(), or its hostname if it was created with soup_address_new_from_sockaddr() or soup_address_new_any().) If cancellable is non-NULL, it can be used to cancel the resolution. callback will still be invoked in this case, with a status of SOUP_STATUS_CANCELLED. It is safe to call this more than once on a given address, from the same thread, with the same async_context (and doing so will not result in redundant DNS queries being made). But it is not safe to call from multiple threads, or with different async_contexts, or mixed with calls to soup_address_resolve_sync().
|
Soup.Address | |
resolve_sync
(Cancellable cancellable)
:
guint32
Synchronously resolves the missing half of addr, as with
soup_address_resolve_async().
Synchronously resolves the missing half of addr, as with
soup_address_resolve_async(). If cancellable is non-NULL, it can be used to cancel the resolution. soup_address_resolve_sync() will then return a status of SOUP_STATUS_CANCELLED. It is safe to call this more than once, even from different threads, but it is not safe to mix calls to soup_address_resolve_sync() with calls to soup_address_resolve_async() on the same address. SOUP_STATUS_CANCELLED.
|
Soup.Address |
None |
Class / Namespace | Method / Signal / Properties |
---|---|
Soup.ClientContext
Method |
get_address
()
:
Soup.Address
Retrieves the SoupAddress associated with the remote end
of a connection. |
Soup.Message
Method |
get_address
()
:
Soup.Address
Gets the address msg's URI points to.
|
Soup.ProxyResolver
Method |
|
Soup.Server
Property |
interface : Soup.Address
|
Soup.Socket
Property |
local_address : Soup.Address
|
Soup.Socket
Property |
remote_address : Soup.Address
|
Soup.Socket
Method |
get_local_address
()
:
Soup.Address
Returns the SoupAddress corresponding to the local end of sock.
|
Soup.Socket
Method |
get_remote_address
()
:
Soup.Address
Returns the SoupAddress corresponding to the remote end of sock.
|