SrtOutputSettings.onConnection property

On connect callback, notifying that a connection has been established. In caller mode this is raised for the single outbound caller, while in listener mode this means a new caller has connected (possibly one of many) and provides the stream_id that was set on the socket

Signature:

onConnection?: (
    streamId: string,
    streamIndex: number,
    remoteHost: string) => void;