ENet without RPC

Godot Version

4.5

Question

When trying to write back to a Godot ENet peer from a non-godot application (not using RPC), how can I trigger a Godot function? ie I want to echo a message from a non-godot app that is sending data via ENet.

Something like:
String message = “Echo: Hi from 1234567890”;
send(peer, channelId, message.getBytes());

Triggers an error:
E 0:00:02:662 on_despawn_receive: Condition “!pinfo.recv_nodes.has(net_id)” is true. Returning: ERR_UNAUTHORIZED
<C++ Source> modules/multiplayer/scene_replication_interface.cpp:664 @ on_despawn_receive()

I assume this is because the bytes are interpreted as an RPC call. Is there a methodology to target a specific function with arg(s)?

It looks like RPC is implemented on top of ENet for Godot. Is it a unique implementation or similar to something else, like GitHub - sp4cerat/Game-NET: RPC Network Library for Multiplayer Games ?

Found that the ENet implementation is constantly changing and it took some surgery to create a CPP client that would interact with it correctly. Generally, it’s not useful to create your own client for Godot’s ENet implementation.