> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class ansys::dpf::Client

![][C++]
![][public]

[Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) for remote DPF connection. A [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) instance is always associated to a DPF server process. The corresponding server needs to run so that the client instance can then be correctly used. This client allows to create DPF objects on a remote server.

**Inherits from**:

* [ansys::dpf::DpfTypes](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md)

## Members

* [callAPI](#classansys-dpf-client-1a59c1b204080ed29f91883d6671eadfbb)
* [Client](#classansys-dpf-client-1ab848ac7d438cfdbac21b5c634771e5eb)
* [Client](#classansys-dpf-client-1a53ac66c262ddb2e4485b6590ddbe4ce6)
* [Client](#classansys-dpf-client-1a2ffa309b414af2d3c89d24e8fb1b292d)
* [Client](#classansys-dpf-client-1a13b12680853a5cd3d21ef45ebc8ff3cf)
* [Client](#classansys-dpf-client-1a04e16bc14f5a885a01dbe0319809aed6)
* [Client](#classansys-dpf-client-1abd9dd9720d7ae3882753e701ccc2b911)
* [describe](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9977945710983bc03d2940fa007847b2)
* [empty](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a39cd546c42518e2332be8f287db95459)
* [emptyClient](#classansys-dpf-client-1a92c3f1e9c2cdfa589372253103065f73)
* [getChannelAddress](#classansys-dpf-client-1ac4d7086213dd34ecb5d83723b85a6a2c)
* [getClient](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a968afd9daa0b0f13b65a2ac61369d73a)
* [getOrStartLocalServer](#classansys-dpf-client-1afd0f1549caf0a53c6fdcb763648e8ff7)
* [getProtocolName](#classansys-dpf-client-1a7bb04a2b5cb70a3d2439a1e31d209dbc)
* [hasBeenMovedLocally](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a1a5634202c15404b6b24e8f50e51cb66)
* [hasInternalObject](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ae198f89868d85c7db6dc1a934a1d3c15)
* [internalObj](#classansys-dpf-client-1a639a846bb0055117950c97f1599d6818)
* [isOnCommonAPI](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9f9789ff61cc9d400a2a344830706b73)
* [isSameObject](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aa64d5f8fcd7d85ad6ebf708494dbefd7)
* [operator=](#classansys-dpf-client-1a0bb061f147ac0b86d79eeef92d9a2089)
* [operator=](#classansys-dpf-client-1a80e74fee04787f2ca20bd0d18dc26315)
* [\~Client](#classansys-dpf-client-1ab8cad35b4ab7dc06f9afa751ea1fda30)
* [\~DpfTypes](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ab7c83b6ea160c2b115e056f6c312112f)

## Friends

## Public functions

### Function Client

![][public]

```cpp theme={null}
ansys::dpf::Client::Client(std::string const &ip, std::string const &port)
```

Create [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) object from known ip and port.

**Parameters**:

* std::string const & **ip**: \[in] server ip
* std::string const & **port**: \[in] server port

**Return type**:

### Function Client

![][public]

```cpp theme={null}
ansys::dpf::Client::Client(std::string const &ip, std::string const &port, LibraryHandle const &library_handle)
```

Create [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) from known ip, port and library handle.

**Parameters**:

* std::string const & **ip**: \[in] server ip
* std::string const & **port**: \[in] server port
* LibraryHandle const & **library\_handle**: \[in] the library\_handle API will be used

**Return type**:

### Function Client

![][public]

```cpp theme={null}
ansys::dpf::Client::Client(std::string const &address)
```

Create [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) from known address.

**Parameters**:

* std::string const & **address**: \[in] string with 'ip::port' format.

**Return type**:

### Function Client

![][public]

```cpp theme={null}
ansys::dpf::Client::Client(std::string const &address, LibraryHandle const &library_handle)
```

Create [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) from known address and library handle.

**Parameters**:

* std::string const & **address**: \[in] string with 'ip::port' format.
* LibraryHandle const & **library\_handle**: \[in] the library\_handle API will be used

**Return type**:

### Function Client

![][public]

```cpp theme={null}
ansys::dpf::Client::Client(Client const &)
```

**Parameters**:

* Client const &

**Return type**:

### Function Client

![][public]

```cpp theme={null}
ansys::dpf::Client::Client(Client &&) noexcept
```

**Parameters**:

* Client &&

**Return type**:

### Function operator=

![][public]

```cpp theme={null}
Client & ansys::dpf::Client::operator=(Client const &)
```

**Parameters**:

* Client const &

**Return type**: Client &

### Function operator=

![][public]

```cpp theme={null}
Client & ansys::dpf::Client::operator=(Client &&) noexcept
```

**Parameters**:

* Client &&

**Return type**: Client &

### Function \~Client

![][public]

```cpp theme={null}
virtual ansys::dpf::Client::~Client()=default
```

**Return type**:

### Function internalObj

![][public]
![][const]

```cpp theme={null}
opaque::DpfObject *const ansys::dpf::Client::internalObj() const
```

**Return type**: opaque::DpfObject \*const

### Function getChannelAddress

![][public]
![][const]

```cpp theme={null}
std::string ansys::dpf::Client::getChannelAddress() const
```

**Returns**:

Address string with 'ip::port' format.

**Return type**: std::string

### Function getProtocolName

![][public]
![][const]

```cpp theme={null}
std::string ansys::dpf::Client::getProtocolName() const
```

**Returns**:

Protocol's name.

**Return type**: std::string

### Function getOrStartLocalServer

![][public]
![][const]

```cpp theme={null}
bool ansys::dpf::Client::getOrStartLocalServer(ansys::dpf::Streams &streams, ansys::dpf::Operator &stream_provider, int output_pin=0) const
```

If it doesn't exist yet, a local server is started. This local server can then be connected to by another server (usually used for bidirectional gRPC connections).

**Parameters**:

* [ansys::dpf::Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md) & **streams**: \[out] [Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md) holding the started server.
* [ansys::dpf::Operator](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-operator.md) & **stream\_provider**: \[in] [Operator](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-operator.md) which can start the server.
* int **output\_pin** = 0 : \[in] output pin of stream\_provider returning a [ansys::dpf::Streams](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-streams.md).

**Return type**: bool

### Function callAPI

![][public]
![][const]

```cpp theme={null}
so::API const  * ansys::dpf::Client::callAPI() const
```

**Return type**: so::API const \*

## Public static functions

### Function emptyClient

![][public]
![][static]

```cpp theme={null}
static Client ansys::dpf::Client::emptyClient()
```

Create an empty client.
**Returns**:

Empty [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md)

**Return type**: Client

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
