AgsOscClient

AgsOscClient — the OSC client

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * domain Read / Write
char * ip4 Read / Write
char * ip6 Read / Write
guint server-port Read / Write

Signals

void connect Run Last
gpointer read-bytes Run Last
void resolve Run Last
gboolean write-bytes Run Last

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsOscClientFlags
    GObject
    ╰── AgsOscClient

Includes

#include <ags/audio/osc/ags_osc_client.h>

Description

AgsOscClient your OSC client.

Functions

AGS_OSC_CLIENT_GET_OBJ_MUTEX()

#define AGS_OSC_CLIENT_GET_OBJ_MUTEX(obj) (&(((AgsOscClient *) obj)->obj_mutex))

ags_osc_client_test_flags ()

gboolean
ags_osc_client_test_flags (AgsOscClient *osc_client,
                           AgsOscClientFlags flags);

Test flags to be set on osc_client .

Parameters

osc_client

the AgsOscClient

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_osc_client_set_flags ()

void
ags_osc_client_set_flags (AgsOscClient *osc_client,
                          AgsOscClientFlags flags);

Set flags.

Parameters

osc_client

the AgsOscClient

 

flags

the flags

 

Since: 3.0.0


ags_osc_client_unset_flags ()

void
ags_osc_client_unset_flags (AgsOscClient *osc_client,
                            AgsOscClientFlags flags);

Unset flags.

Parameters

osc_client

the AgsOscClient

 

flags

the flags

 

Since: 3.0.0


ags_osc_client_resolve ()

void
ags_osc_client_resolve (AgsOscClient *osc_client);

Resolve OSC client.

Parameters

osc_client

the AgsOscClient

 

Since: 3.0.0


ags_osc_client_connect ()

void
ags_osc_client_connect (AgsOscClient *osc_client);

Connect OSC client.

Parameters

osc_client

the AgsOscClient

 

Since: 3.0.0


ags_osc_client_read_bytes ()

guchar *
ags_osc_client_read_bytes (AgsOscClient *osc_client,
                           guint *data_length);

Read bytes.

Parameters

osc_client

the AgsOscClient

 

data_length

the return location of byte array's length

 

Returns

byte array read or NULL if no data available

Since: 3.0.0


ags_osc_client_write_bytes ()

gboolean
ags_osc_client_write_bytes (AgsOscClient *osc_client,
                            guchar *data,
                            guint data_length);

Write data using OSC client.

Parameters

osc_client

the AgsOscClient

 

data

the byte array

 

data_length

the length of byte array

 

Returns

TRUE if all bytes written, otherwise FALSE

Since: 3.0.0


ags_osc_client_new ()

AgsOscClient *
ags_osc_client_new ();

Creates a new instance of AgsOscClient

Returns

the new AgsOscClient

Since: 3.0.0

Types and Values

AGS_OSC_CLIENT_DEFAULT_MAX_ADDRESS_LENGTH

#define AGS_OSC_CLIENT_DEFAULT_MAX_ADDRESS_LENGTH (2048)

AGS_OSC_CLIENT_DEFAULT_SERVER_PORT

#define AGS_OSC_CLIENT_DEFAULT_SERVER_PORT (9000)

AGS_OSC_CLIENT_DEFAULT_DOMAIN

#define AGS_OSC_CLIENT_DEFAULT_DOMAIN "localhost"

AGS_OSC_CLIENT_DEFAULT_INET4_ADDRESS

#define AGS_OSC_CLIENT_DEFAULT_INET4_ADDRESS "127.0.0.1"

AGS_OSC_CLIENT_DEFAULT_INET6_ADDRESS

#define AGS_OSC_CLIENT_DEFAULT_INET6_ADDRESS "::1"

AGS_OSC_CLIENT_DEFAULT_MAX_RETRY

#define AGS_OSC_CLIENT_DEFAULT_MAX_RETRY (16)

AGS_OSC_CLIENT_CHUNK_SIZE

#define AGS_OSC_CLIENT_CHUNK_SIZE (131072)

AGS_OSC_CLIENT_DEFAULT_CACHE_DATA_LENGTH

#define AGS_OSC_CLIENT_DEFAULT_CACHE_DATA_LENGTH (256)

enum AgsOscClientFlags

Enum values to configure OSC client.

Members

AGS_OSC_CLIENT_INET4

use IPv4 socket

 

AGS_OSC_CLIENT_INET6

use IPv6 socket

 

AGS_OSC_CLIENT_UDP

use UDP transport protocol

 

AGS_OSC_CLIENT_TCP

used TCP transport protocol

 

Property Details

The “domain” property

  “domain”                   char *

The domain to lookup server.

Owner: AgsOscClient

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “ip4” property

  “ip4”                      char *

The IPv4 address as string of the server.

Owner: AgsOscClient

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “ip6” property

  “ip6”                      char *

The IPv6 address as string of the server.

Owner: AgsOscClient

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “server-port” property

  “server-port”              guint

The server port to connect.

Owner: AgsOscClient

Flags: Read / Write

Default value: 9000

Since: 3.0.0

Signal Details

The “connect” signal

void
user_function (AgsOscClient *osc_client,
               gpointer      user_data)

The ::connect signal is emited as connection is establishing.

Parameters

osc_client

the AgsOscClient

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “read-bytes” signal

gpointer
user_function (AgsOscClient *osc_client,
               gpointer      data_length,
               gpointer      user_data)

The ::read-bytes signal is emited while read bytes.

Parameters

osc_client

the AgsOscClient

 

data_length

the return location of byte array's length

 

user_data

user data set when the signal handler was connected.

 

Returns

byte array read or NULL if no data available

Flags: Run Last

Since: 3.0.0


The “resolve” signal

void
user_function (AgsOscClient *osc_client,
               gpointer      user_data)

The ::resolve signal is emited during resolve of domain.

Parameters

osc_client

the AgsOscClient

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “write-bytes” signal

gboolean
user_function (AgsOscClient *osc_client,
               gpointer      data,
               guint         data_length,
               gpointer      user_data)

The ::write-bytes signal is emited while write bytes.

Parameters

osc_client

the AgsOscClient

 

data

the byte array

 

data_length

the length of byte array

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE if all bytes written, otherwise FALSE

Flags: Run Last

Since: 3.0.0