For After Effects UXP, will plugins be able to maintain a persistent ws://localhost or ws://127.0.0.1 WebSocket connection to a C++ plugin on both macOS and Windows, including while the panel is hidden? Will localhost WebSockets require TLS or any special permissions?
You can use WebSocket client in UXP today.
You’ll need a UXP Hybrid Plugin if your plugin needs to run a WebSocket server.