DevdNetworkClient

DevdNetworkClient — a client to communicate with network nodes

Functions

Properties

GInetSocketAddress * address Read / Write / Construct Only
GTlsCertificate * certificate Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── DevdClient
        ╰── DevdNetworkClient

Description

This is a DevdClient implementation that communicates with a network peer.

Functions

devd_network_client_new ()

DevdNetworkClient *
devd_network_client_new (GInetSocketAddress *address,
                         GTlsCertificate *certificate);

Creates a new DevdNetworkClient.

You can use this instead of devd_device_create_client() if you know who you want to communicate with already and the certificate to use.

Generally, you should wait for devices to show up using DevdBrowser and then call devd_device_create_client() to create a client for that device.

Parameters

address

a GInetSocketAddress

 

certificate

a GTlsCertificate or NULL.

[nullable]

Returns

a DevdNetworkClient.

[transfer full]

Since: 3.28


devd_network_client_get_address ()

GInetSocketAddress *
devd_network_client_get_address (DevdNetworkClient *self);

Gets the address that is to be used to connect to the device.

Parameters

self

a DevdNetworkClient

 

Returns

a GInetSocketAddress.

[transfer none]

Since: 3.28


devd_network_client_get_certificate ()

GTlsCertificate *
devd_network_client_get_certificate (DevdNetworkClient *self);

Gets the certificate for the network client.

Parameters

self

a DevdNetworkClient

 

Returns

a GTlsCertificate.

[transfer none]

Since: 3.28

Types and Values

DEVD_TYPE_NETWORK_CLIENT

#define DEVD_TYPE_NETWORK_CLIENT (devd_network_client_get_type())

DevdNetworkClient

typedef struct _DevdNetworkClient DevdNetworkClient;

Property Details

The “address” property

  “address”                  GInetSocketAddress *

The "address" is the destination that we will attept to connect to using this client, when devd_client_connect_async() is called.

Owner: DevdNetworkClient

Flags: Read / Write / Construct Only


The “certificate” property

  “certificate”              GTlsCertificate *

The client TLS certificate to use for communication.

Owner: DevdNetworkClient

Flags: Read / Write / Construct Only