perConnection
fun perConnection(scripts: List<List<DummyLiveStep>>, name: String = "dummy-live-model", afterScripts: List<DummyLiveStep> = emptyList(), onConnect: (Int) -> Unit = {}, onSend: suspend (connection: Int, message: Any) -> Unit = { _, _ -> }): DummyLiveModel
Creates a model whose connection i plays scripts[i], and a connection past the last plays afterScripts, or fails the test when that is empty. onConnect gets each connection's index once it is recorded. onSend runs after each send is recorded and may suspend or throw to fake a slow or failed write.