> For the complete documentation index, see [llms.txt](https://owo-game.gitbook.io/c++/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://owo-game.gitbook.io/c++/connection.md).

# Connection

There are two ways to establish a connection with OWO:

**1. Manual connection:** The user must enter the IP that the OWO App provides during the games scan. To establish this connection you have to use the `Connect` method of the `OWO` class.

```cpp
//The ip is provided to the user by the owo app.
owo->Connect({ip});
// You can also connect to multiple ips 
owo->Connect({ip1, ip2, ip3, ...});
```

**2. Automatic IP:** Through the Autoconnect function, the OWO API will prepare itself to connect to any available OWO App. This may not work if there is an App like OpenVPN opened or if the network does not allow this type of connection (broadcast).

```cpp
owo->AutoConnect();
```

After the connection has been prepared you now need to call the UpdateStatus method to listen for messages on the network.  This method needs to be called in a loop and to be passed the total time since program start up in milliseconds.

```cpp
 owo->UpdateStatus(timeInMs);
```

{% hint style="danger" %}
**Important:** Before attempting to connect you **must** have called the [Configure ](https://owo-game.gitbook.io/c++/configure-your-game)method.
{% endhint %}
