1.47 <GInetSocketAddress>

Class: <GInetSocketAddress>

It derives from <GSocketAddress>.

An IPv4 or IPv6 socket address. That is, the combination of a <GInetAddress> and a port number.

In UNIX terms, <GInetSocketAddress> corresponds to a ‘struct sockaddr_in‘ or ‘struct sockaddr_in6‘).

Fields

parent-instance

Properties

Property: inet-socket-address:address self

The address.

Its value is a <GInetAddress>, or #f.

It can only be set when the object is made, with #:address.

Property: inet-socket-address:flowinfo self

The sin6_flowinfo field, for IPv6 addresses.

If unset this property is inherited from inet-socket-address:address.

Its value is an unsigned 32-bit integer.

It can only be set when the object is made, with #:flowinfo.

Property: inet-socket-address:port self

The port.

Its value is an unsigned 32-bit integer.

It can only be set when the object is made, with #:port.

Property: inet-socket-address:scope-id self

The sin6_scope_id field, for IPv6 addresses.

If unset this property is inherited from inet-socket-address:address.

Its value is an unsigned 32-bit integer.

It can only be set when the object is made, with #:scope-id.

Procedures

Method: inet-socket-address:get-address self ⇒ %return
Method: get-address self ⇒ %return

Gets self’s <GInetAddress>.

self

Passed: a <GInetSocketAddress>.

a <GInetSocketAddress>

%return

Returned: a <GInetAddress>.

the <GInetAddress> for self, which must be object:ref’d if it will be stored

Method: inet-socket-address:get-flowinfo self ⇒ %return
Method: get-flowinfo self ⇒ %return

Gets the sin6_flowinfo field from self, which must be an IPv6 address.

If not overridden this value will be inherited from inet-socket-address:address.

self

Passed: a <GInetSocketAddress>.

a ipv6 <GInetSocketAddress>

%return

Returned: an unsigned 32-bit integer.

the flowinfo field

Method: inet-socket-address:get-port self ⇒ %return
Method: get-port self ⇒ %return

Gets self’s port.

self

Passed: a <GInetSocketAddress>.

a <GInetSocketAddress>

%return

Returned: an unsigned 16-bit integer.

the port for self

Method: inet-socket-address:get-scope-id self ⇒ %return
Method: get-scope-id self ⇒ %return

Gets the sin6_scope_id field from self, which must be an IPv6 address.

If not overridden this value will be inherited from inet-socket-address:address.

self

Passed: a <GInetSocketAddress>.

a ipv6 <GInetAddress>

%return

Returned: an unsigned 32-bit integer.

the scope id field

Procedure: inet-socket-address:new address port ⇒ %return

Creates a new <GInetSocketAddress> for address and port.

address

Passed: a <GInetAddress>.

a <GInetAddress>

port

Passed: an unsigned 16-bit integer.

a port number

%return

Returned: a <GSocketAddress>.

a new <GInetSocketAddress>

Procedure: inet-socket-address:new-from-string address port ⇒ %return

Creates a new <GInetSocketAddress> for address and port.

If address is an IPv6 address, it can also contain a scope ID (separated from the address by a %). Note that currently this behavior is platform specific. This may change in a future release.

address

Passed: a string.

the string form of an IP address

port

Passed: an unsigned 32-bit integer.

a port number

%return

Returned: a <GSocketAddress>, or #f.

a new <GInetSocketAddress>, or #f if address cannot be parsed.