SCRC v0.4.0 Scrc.Client View Source
Client implements boilerplate code for implementing an SCRC client.
It forwards the domain specific calls to it’s driver
.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Start a new client instance to the specified endpoint. Use provided driver process for controlling
Request a race restart from server
Send actor command to server
Send initialization (focus) data to server
Start the race
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
init(%{endpoint: Scrc.Server.endpoint(), driver: pid()}) :: map()
Start a new client instance to the specified endpoint. Use provided driver process for controlling.
Request a race restart from server.
send_actor_data(pid(), Scrc.ActorData.t()) :: :ok
Send actor command to server.
send_init_data(pid(), Scrc.InitData.t()) :: :ok
Send initialization (focus) data to server.
Start the race
Send initial data to server and start to wait for data