Networking server host question

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Raikish

Hi, i’m trying to learn about networking system.
I’m doing a game that have two players in lan that one controls the move input and the other controls the attack input.
My server host is one of these players. So my question is…

Do I have to create a client for each player (even if that one acts as the server) and then store it into an array to be able to access to each player’s properties?
Doing so the remote functions will execute in all clients, but will it execute twice in the host client if I use a sync function?

I saw this code by godot documentation High level multiplayer — Godot Engine (3.0) documentation in English

remote func register_player(id, info):
# Store the info
player_info[id] = info
# If I'm the server, let the new guy know about existing players
if get_tree().is_network_server():
    # Send my info to new player
    rpc_id(id, "register_player", 1, my_info)
    # Send the info of existing players
    for peer_id in player_info:
        rpc_id(id, "register_player", peer_id, player_info[peer_id])

But with this code the server is not part of the players, how i should to adapt that to make it part. As another player?