Method

GioSocketClientset_local_address

since: 2.22

Declaration

void
g_socket_client_set_local_address (
  GSocketClient* client,
  GSocketAddress* address
)

Description

Sets the local address of the socket client. The sockets created by this object will bound to the specified address (if not NULL) before connecting.

This is useful if you want to ensure that the local side of the connection is on a specific port, or on a specific interface.

Available since: 2.22

Parameters

address

Type: GSocketAddress

A GSocketAddress, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.