GObject.Object
Soup.Address
Import line: | Soup = imports.gi.Soup; |
GIR File: | Soup-2.4.gir |
C documentation: | SoupAddress |
Class : | Address |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
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 : Number
|
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 | ||
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
()
:
Number
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
()
:
Boolean
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 | |
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)
:
Number
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.Connection
Property |
remote_address : Soup.Address
|
Soup.Connection
Property |
tunnel_address : Soup.Address
|
Soup.Connection
Method |
get_tunnel_addr
()
:
Soup.Address
|
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.Session
Method |
make_connect_message
(Address server_addr)
:
Soup.MessageQueueItem
|
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.
|