Camel.Session.ref_network_monitor

### Method

# Camel Sessionref_network_monitor

since: 3.22

#### Declaration [src]

    GNetworkMonitor*
    camel_session_ref_network_monitor (
      CamelSession* session
    )

#### Description [src]

References a `GNetworkMonitor` instance, which had been previously set by camel_session_set_network_monitor(). If none is set, then the default `GNetworkMonitor` is returned, as provided by g_network_monitor_get_default(). The returned pointer is referenced for thread safety, unref it with `g_object_unref()` when no longer needed.

Available since: 3.22

#### Return value

Type: `GNetworkMonitor`

A referenced `GNetworkMonitor` instance to use for network availability tests.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.