send

abstract suspend fun <P : Any> send(toComponent: ComponentRef, message: P, serializer: KSerializer<in P>): Either<ComponentError, Unit>

Sends a message of type P by serializing it with the given serializer. This method can fail with a ComponentNotRegistered if the toComponent is not registered as link of this component.