FAForever / kotlin-ice-adapter

MIT License
2 stars 3 forks source link

CLI: Add RPC control plane #4

Closed Brutus5000 closed 1 year ago

Brutus5000 commented 1 year ago

In CLI mode the ICE adapter is exchanging commands via RPC. A first implementation should be compatible to the java-ice-adapter RPC protocol (link).

BlackYps commented 1 year ago

can you elaborate what needs to be done?

Brutus5000 commented 1 year ago

Open a RPC server just like in the java-ice-adapter (see the link) from the com.nbarraille.jjsonrpc library. Basically all methods in the ControlPlane interface have a corresponding message on the RPC service. So incoming rpc message -> call the IceAdapter method. There are also outgoing messages. I think so far it's only the onIceCandidatesGathered callback in the IceAdapter constructor. There you basically give it a lambda to send this message via RPC to the FAF client.