CommandService

The CommandService allows the application to send custom text commands to all other clients. It also emits the received event informing about received messages.

Events

received

received(participant: VTParticipant, message: String)

Emitted when a message is received.

Parameters:

NameType
participantVTParticipant
messageString

Accessors

delegate

delegate: VTCommandDelegate

Delegate, a means of communication between objects in the command service.

Returns: VTCommandDelegate

Methods

send

send(message: String, completion: ((_ error: NSError?) -> Void)?)

Sends a message (basic string) to all other clients.

Parameters:

NameTypeDefaultDescription
messageString-The message to send
completion((_ error: NSError?) -> Void)?nil-