## AgsOscServer

AgsOscServer — the OSC server

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_OSC_SERVER_GET_OBJ_MUTEX()
gboolean | ags_osc_server_test_flags ()
void | ags_osc_server_set_flags ()
void | ags_osc_server_unset_flags ()
void | ags_osc_server_add_connection ()
void | ags_osc_server_remove_connection ()
void | ags_osc_server_add_controller ()
void | ags_osc_server_remove_controller ()
void | ags_osc_server_add_default_controller ()
void | ags_osc_server_start ()
void | ags_osc_server_stop ()
gboolean | ags_osc_server_listen ()
void | ags_osc_server_dispatch ()
AgsOscServer * | ags_osc_server_new ()

## Properties

gpointer | connection | Read / Write
gpointer | controller | Read / Write
char * | domain | Read / Write
AgsOscFrontController * | front-controller | Read / Write
char * | ip4 | Read / Write
char * | ip6 | Read / Write
guint | server-port | Read / Write

## Signals

void | dispatch | Run Last
gboolean | listen | Run Last
void | start | Run Last
void | stop | Run Last

## Types and Values

#define | AGS_OSC_SERVER_DEFAULT_MAX_ADDRESS_LENGTH
#define | AGS_OSC_SERVER_DEFAULT_SERVER_PORT
#define | AGS_OSC_SERVER_DEFAULT_DOMAIN
#define | AGS_OSC_SERVER_DEFAULT_INET4_ADDRESS
#define | AGS_OSC_SERVER_DEFAULT_INET6_ADDRESS
#define | AGS_OSC_SERVER_DEFAULT_BACKLOG
#define | AGS_OSC_SERVER_DEFAULT_MAX_CONNECTIONS
enum | AgsOscServerFlags

## Object Hierarchy

        GFlags
        ╰── AgsOscServerFlags
        GObject
        ╰── AgsOscServer
            ╰── AgsOscXmlrpcServer

## Includes

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

## Description

AgsOscServer your osc server.

## Functions

### AGS_OSC_SERVER_GET_OBJ_MUTEX()

    #define AGS_OSC_SERVER_GET_OBJ_MUTEX(obj) (&(((AgsOscServer *) obj)->obj_mutex))

### ags_osc_server_test_flags ()

    gboolean
    ags_osc_server_test_flags (AgsOscServer *osc_server,
                               AgsOscServerFlags flags);

Test `flags` to be set on `osc_server` .

#### Parameters

osc_server | the AgsOscServer |
flags | the flags |

#### Returns

`TRUE` if flags are set, else `FALSE`

Since: 3.0.0

### ags_osc_server_set_flags ()

    void
    ags_osc_server_set_flags (AgsOscServer *osc_server,
                              AgsOscServerFlags flags);

Set flags.

#### Parameters

osc_server | the AgsOscServer |
flags | the flags |

Since: 3.0.0

### ags_osc_server_unset_flags ()

    void
    ags_osc_server_unset_flags (AgsOscServer *osc_server,
                                AgsOscServerFlags flags);

Unset flags.

#### Parameters

osc_server | the AgsOscServer |
flags | the flags |

Since: 3.0.0

### ags_osc_server_add_connection ()

    void
    ags_osc_server_add_connection (AgsOscServer *osc_server,
                                   GObject *osc_connection);

Add `osc_connection` to `osc_server` .

#### Parameters

osc_server | the AgsOscServer |
osc_connection | the AgsOscConnection |

Since: 3.0.0

### ags_osc_server_remove_connection ()

    void
    ags_osc_server_remove_connection (AgsOscServer *osc_server,
                                      GObject *osc_connection);

Remove `osc_connection` from `osc_server` .

#### Parameters

osc_server | the AgsOscServer |
osc_connection | the AgsOscConnection |

Since: 3.0.0

### ags_osc_server_add_controller ()

    void
    ags_osc_server_add_controller (AgsOscServer *osc_server,
                                   GObject *osc_controller);

Add `osc_controller` to `osc_server` .

#### Parameters

osc_server | the AgsOscServer |
osc_controller | the AgsOscController |

Since: 3.0.0

### ags_osc_server_remove_controller ()

    void
    ags_osc_server_remove_controller (AgsOscServer *osc_server,
                                      GObject *osc_controller);

Remove `osc_controller` from `osc_server` .

#### Parameters

osc_server | the AgsOscServer |
osc_controller | the AgsOscController |

Since: 3.0.0

### ags_osc_server_add_default_controller ()

    void
    ags_osc_server_add_default_controller (AgsOscServer *osc_server);

Add default controlers to `osc_server` .

#### Parameters

osc_server | the AgsOscServer |

Since: 3.0.0

### ags_osc_server_start ()

    void
    ags_osc_server_start (AgsOscServer *osc_server);

Start OSC server.

#### Parameters

osc_server | the AgsOscServer |

Since: 3.0.0

### ags_osc_server_stop ()

    void
    ags_osc_server_stop (AgsOscServer *osc_server);

Stop OSC server.

#### Parameters

osc_server | the AgsOscServer |

Since: 3.0.0

### ags_osc_server_listen ()

    gboolean
    ags_osc_server_listen (AgsOscServer *osc_server);

Listen as OSC server.

#### Parameters

osc_server | the AgsOscServer |

#### Returns

`TRUE` as a new connection was initiated, otherwise `FALSE`

Since: 3.0.0

### ags_osc_server_dispatch ()

    void
    ags_osc_server_dispatch (AgsOscServer *osc_server);

Dispatch the OSC server.

#### Parameters

osc_server | the AgsOscServer |

Since: 3.0.0

### ags_osc_server_new ()

    AgsOscServer *
    ags_osc_server_new ();

Creates a new instance of AgsOscServer

#### Returns

the new AgsOscServer

Since: 3.0.0

## Types and Values

### AGS_OSC_SERVER_DEFAULT_MAX_ADDRESS_LENGTH

    #define AGS_OSC_SERVER_DEFAULT_MAX_ADDRESS_LENGTH (2048)

### AGS_OSC_SERVER_DEFAULT_SERVER_PORT

    #define AGS_OSC_SERVER_DEFAULT_SERVER_PORT (9000)

### AGS_OSC_SERVER_DEFAULT_DOMAIN

    #define AGS_OSC_SERVER_DEFAULT_DOMAIN "localhost"

### AGS_OSC_SERVER_DEFAULT_INET4_ADDRESS

    #define AGS_OSC_SERVER_DEFAULT_INET4_ADDRESS "127.0.0.1"

### AGS_OSC_SERVER_DEFAULT_INET6_ADDRESS

    #define AGS_OSC_SERVER_DEFAULT_INET6_ADDRESS "::1"

### AGS_OSC_SERVER_DEFAULT_BACKLOG

    #define AGS_OSC_SERVER_DEFAULT_BACKLOG (512)

### AGS_OSC_SERVER_DEFAULT_MAX_CONNECTIONS

    #define AGS_OSC_SERVER_DEFAULT_MAX_CONNECTIONS (8192)

### enum AgsOscServerFlags

Enum values to control the behavior or indicate internal state of AgsOscServer by enable/disable as flags.

#### Members

AGS_OSC_SERVER_STARTED | the server was started |
AGS_OSC_SERVER_RUNNING | the server is up and running |
AGS_OSC_SERVER_TERMINATING | the server is closing connections and terminating |
AGS_OSC_SERVER_INET4 | use IPv4 |
AGS_OSC_SERVER_INET6 | use IPv6 |
AGS_OSC_SERVER_UDP | run using UDP transport |
AGS_OSC_SERVER_TCP | run using TCP transport |
AGS_OSC_SERVER_UNIX | run on UNIX socket |
AGS_OSC_SERVER_ANY_ADDRESS | listen on any address |
AGS_OSC_SERVER_AUTO_START | start the server |

## Property Details

### The `“connection”` property

      “connection”               gpointer

The assigned AgsOscConnection providing default settings.

[transfer full]

Owner: AgsOscServer

Flags: Read / Write

Since: 3.0.0

### The `“controller”` property

      “controller”               gpointer

The assigned AgsOscController providing default settings.

[transfer full]

Owner: AgsOscServer

Flags: Read / Write

Since: 3.0.0

### The `“domain”` property

      “domain”                   char *

The domain to use.

Owner: AgsOscServer

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“front-controller”` property

      “front-controller”         AgsOscFrontController *

The assigned AgsOscFrontController.

Owner: AgsOscServer

Flags: Read / Write

Since: 3.0.0

### The `“ip4”` property

      “ip4”                      char *

The IPv4 address as string of the server.

Owner: AgsOscServer

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“ip6”` property

      “ip6”                      char *

The IPv6 address as string of the server.

Owner: AgsOscServer

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“server-port”` property

      “server-port”              guint

The server port to use.

Owner: AgsOscServer

Flags: Read / Write

Default value: 9000

Since: 3.0.0

## Signal Details

### The `“dispatch”` signal

    void
    user_function (AgsOscServer *osc_server,
                   gpointer      user_data)

The ::dispatch signal is emited during dispatch of server.

#### Parameters

osc_server | the AgsOscServer |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.0.0

### The `“listen”` signal

    gboolean
    user_function (AgsOscServer *osc_server,
                   gpointer      user_data)

The ::listen signal is emited during listen of server.

#### Parameters

osc_server | the AgsOscServer |
user_data | user data set when the signal handler was connected. |

#### Returns

`TRUE` as a new connection was initiated, otherwise `FALSE`

Flags: Run Last

Since: 3.0.0

### The `“start”` signal

    void
    user_function (AgsOscServer *osc_server,
                   gpointer      user_data)

The ::start signal is emited during start of server.

#### Parameters

osc_server | the AgsOscServer |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.0.0

### The `“stop”` signal

    void
    user_function (AgsOscServer *osc_server,
                   gpointer      user_data)

The ::stop signal is emited during stop of server.

#### Parameters

osc_server | the AgsOscServer |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.0.0