---
name: "evs_dispatch"
section: "3"
platform: "linux"
package: "corosync-dev"
version: "1.4.6-1.1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/evs_dispatch"
---

# evs\_dispatch(3)

Dispatches callbacks from the EVS service

## NAME

evs\_dispatch - Dispatches callbacks from the EVS service

## SYNOPSIS

**#include \<corosync/evs.h\>**

**int evs\_dispatch(evs\_handle\_t** *handle***, evs\_dispatch\_t \****dispatch\_types***);**

## DESCRIPTION

The **evs\_dispatch** function is used to dispatch configuration changes or messages from the extended virtual synchrony API.

Each application may have several connections to the EVS API.  Each  application uses the *handle* argument to uniquely identify the connection.

The *dispatch\_types* argument is used to identify the type of dispatch to execute.  The possible types are defined by the structure:

-

  ```
  typedef enum {
          EVS_DISPATCH_ONE,
          EVS_DISPATCH_ALL,
          EVS_DISPATCH_BLOCKING
  } evs_dispatch_t;
  ```

-

  The dispatch values have the following meanings:

- **EVS\_DISPATCH\_ONE**

  Dispatch atleast one callback, blocking until the callback is dispatched.

- **EVS\_DISPATCH\_ALL**

  Dispatch all waiting callbacks without blocking to wait for any callbacks.

- **EVS\_DISPATCH\_BLOCKING**

  Dispatch all callbacks blocking indefinately.  This is used in a threaded program where a thread is created, and then evs\_dispatch() is called immediately from the created thread to execute callbacks.

## RETURN VALUE

This call returns the EVS\_OK value if successful, otherwise an error is returned.

## ERRORS

The errors are undocumented.

## SEE ALSO

[**evs\_overview**(8)](/evs_overview/8.md), [**evs\_initialize**(3)](/evs_initialize/3.md), [**evs\_finalize**(3)](/evs_finalize/3.md), [**evs\_fd\_get**(3)](/evs_fd_get/3.md), [**evs\_join**(3)](/evs_join/3.md), [**evs\_leave**(3)](/evs_leave/3.md), [**evs\_mcast\_joined**(3)](/evs_mcast_joined/3.md), [**evs\_mcast\_groups**(3)](/evs_mcast_groups/3.md), [**evs\_membership\_get**(3)](/evs_membership_get/3.md) [**evs\_context\_get**(3)](/evs_context_get/3.md) [**evs\_context\_set**(3)](/evs_context_set/3.md)
