> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::distributed::ServiceWorkerEndpoint

> Interface for services that act as worker endpoints in distributed applications.

Interface for services that act as worker endpoints in distributed applications.

`ServiceWorkerEndpoint` defines the interface for services that participate as workers in a distributed application. Workers typically connect to a driver fragment to participate in distributed coordination.

```cpp showLineNumbers={false}
#include <holoscan/distributed/fragment_service.hpp>
```

***

## Constructors

### ServiceWorkerEndpoint \[#serviceworkerendpoint]

```cpp showLineNumbers={false}
holoscan::distributed::ServiceWorkerEndpoint::ServiceWorkerEndpoint() = default
```

### Destructor \[#destructor]

### \~ServiceWorkerEndpoint

```cpp showLineNumbers={false}
virtual holoscan::distributed::ServiceWorkerEndpoint::~ServiceWorkerEndpoint() = default
```

***

## Methods

### worker\_connect \[#workerconnect]

```cpp showLineNumbers={false}
virtual void holoscan::distributed::ServiceWorkerEndpoint::worker_connect(
    std::string_view driver_ip
)
```

Connect the worker endpoint to the driver.

This method is called by the framework on worker fragments to establish a connection with the driver fragment. Implementations should connect to the driver and prepare to participate in distributed operations.

**Parameters**

The IP address of the driver fragment to connect to.

### worker\_disconnect \[#workerdisconnect]

```cpp showLineNumbers={false}
virtual void holoscan::distributed::ServiceWorkerEndpoint::worker_disconnect()
```

Disconnect the worker endpoint from the driver.

This method is called by the framework when the worker needs to disconnect from the driver. Implementations should clean up the connection and any associated resources.