# CFX::GET_CURRENT_SERVER_ENDPOINT

- **Hash:** `0xEA11BFBA`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetCurrentServerEndpoint`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_CURRENT_SERVER_ENDPOINT

## Signature

```c
char* GET_CURRENT_SERVER_ENDPOINT();
```

## Returns

`char*` — The peer address of the game server (e.g. `127.0.0.1:30120`), or NULL if not available.

## Description

*Source: Cfx.re native reference*

Returns the peer address of the remote game server that the user is currently connected to.

## Usage

### Lua

```lua
local retval = GetCurrentServerEndpoint()

-- always available, by hash
local retval = Citizen.InvokeNative(0xea11bfba, Citizen.ResultAsString())
```

### JavaScript

```js
const retval = GetCurrentServerEndpoint();

// by hash
const retval = Citizen.invokeNative('0xea11bfba', Citizen.returnResultAnyway(), Citizen.resultAsString());
```

### C#

```csharp
string retval = Function.Call<string>((Hash)0xea11bfba);
```

*Sources: Cfx.re native reference.*
