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

# PFLobbyServerPostUpdateAsServer

> PFLobbyServerPostUpdateAsServer reference for posting an update to a client-owned PlayFab lobby from a joined game_server via the PlayFab Multiplayer C++ SDK.

Post an update to a client-owned lobby as a joined server.

## Syntax

```cpp theme={null}
HRESULT PFLobbyServerPostUpdateAsServer(  
    PFLobbyHandle lobby,  
    const PFLobbyServerDataUpdate* serverUpdate,  
    void* asyncContext  
)  
```

### Parameters

**`lobby`**   PFLobbyHandle

The handle of the lobby.

**`serverUpdate`**   [PFLobbyServerDataUpdate\*](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverdataupdate.md)

An update to apply to the portion of the lobby data owned by the joined server.

**`asyncContext`**   void\*\
*optional*

An optional, app-defined, pointer-sized context value that can be used to associate the completion state change with this call.

### Return value

Type: HRESULT

`S_OK` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PFMultiplayerGetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md).

## Remarks

To use this feature, you must define PFMULTIPLAYER\_INCLUDE\_SERVER\_APIS before including PFLobby.h. \
\
&#x20;This is an asynchronous operation. Upon successful completion, the title is provided a [PFLobbyServerPostUpdateAsServerCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange.md) with the [PFLobbyServerPostUpdateAsServerCompletedStateChange::result](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange.md) field set to `S_OK`. Upon a failed completion, the title is provided a [PFLobbyServerPostUpdateAsServerCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange.md) with the [PFLobbyServerPostUpdateAsServerCompletedStateChange::result](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyserverpostupdateasservercompletedstatechange.md) field set to a failure. If applying the update would change the state of the lobby, the title is provided a [PFLobbyUpdatedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) sometime afterwards.   \
\
&#x20;This operation completing successfully only indicates that the Lobby service accepted the update. The title's local view of the Lobby state doesn't reflect this update until a [PFLobbyUpdatedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) is provided to the title with the updated state.   \
\
&#x20;This operation is restricted to client-owned lobbies that are using connections.

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)\
[PFLobbyPostUpdate](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbypostupdate.md)


## Related topics

- [PFLobbyServerLeaveAsServer](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverleaveasserver.md)
- [PlayFab Multiplayer C++ SDK Release Notes](https://docs.xbox.com/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [Lobby ownership](https://docs.xbox.com/services/playfab/multiplayer/lobby/owner-requirements-and-privileges.md)
- [PFMultiplayer C/C++ API overview - PFLobby.h](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [PFLobbyStateChangeType](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/enums/pflobbystatechangetype.md)
