-
QuestionHi, I have a question regarding the reconnect behavior with My understanding is that setting a Is this the expected behavior, or is there a proper way to configure Background / Tried StepsURLs used: Listener: Caller: Caller code snippet: private func startStream() async throws {
Task.detached(priority: .userInitiated) { [weak self] in
guard let self else { return }
try await self.connection.connect(streamURL)
await self.stream.play()
}
}
func stopPlayer() async {
await stream.close()
await removeAllOutput()
}After calling EnvironmentiPad mini 7 - iOS 26 Could you advise if there is a correct way to allow the caller to reconnect without restarting the listener? Thank you for your guidance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
RTMP works that way, but I thought SRT might behave differently. I understand that Of course, it’s possible that I’m misunderstanding the specification, so if you have documentation on this, I’d appreciate it if you could share it. |
Beta Was this translation helpful? Give feedback.
So that impression came from Larix’s behavior, I see.
This is due more to HaishinKit’s design than to the SRT specification.
SRTConnectionis designed so that the remote connection and the local connection have a 1:1 relationship. For that reason, when the remote connection is closed, the local side is also treated asclosed.You can monitor connection and disconnection events by observing
SRTConnection.connected.