Merging client and server in the same app

func client_set(server_ip, server_port):
print("Server IP : ", server_ip)
print(“Connecting to server …”)

client_custom = ENetMultiplayerPeer.new()

client_custom.create_client(server_ip, server_port)

#multiplayer_api = MultiplayerAPI.create_default_interface()
#get_tree().set_multiplayer(multiplayer_api, get_path()) 

multiplayer.multiplayer_peer = client_custom

client_custom.peer_connected.connect(_on_connected_ok)
client_custom.peer_disconnected.connect(_on_connected_fail)

func server_set():
print(“Starting the Custom server …”)
print("Server port: ", SERVER_PORT)

server_custom = ENetMultiplayerPeer.new()

#multiplayer_api = MultiplayerAPI.create_default_interface()
#get_tree().set_multiplayer(multiplayer_api, get_path()) 

server_custom.create_server(SERVER_PORT, max_peers)

multiplayer.multiplayer_peer = server_custom

server_custom.peer_connected.connect(_on_peer_connected)
server_custom.peer_disconnected.connect(_on_peer_disconnected)

decommenting mulitplayer api makes the client connect only locally, and not to another exe launched app, what to do ?

Are you trying to boost this by these comments? Please don’t, if someone has an answer they’ll give them

well let s think, the client get confused and instead of calling the rpc function in another app, comes back to call it locally
if add these two lines :
#multiplayer_api = MultiplayerAPI.create_default_interface()
#get_tree().set_multiplayer(multiplayer_api, get_path())
??

without it, technically the client doesnt recognize the server

i was having this in mind too !

If you keep spamming like this instead of waiting for people to respond you’re more likely to be ignored, it doesn’t help at all