public IcyInterceptorStream(Stream stream, RadioCaster radioCaster) { UnderlyingStream = stream; RadioCaster = radioCaster; // First thing that should be sent is the metadata though // InterceptedBytes = RadioCaster.RadioInfo.MetadataInterval; }
public RadioCastServer(IPEndPoint endpoint, RadioInfo radioInfo) { Endpoint = endpoint; RadioInfo = radioInfo; Caster = new RadioCaster(radioInfo); Caster.OnTrackChanged += (_, eventData) => { OnTrackChanged?.Invoke(this, eventData); }; Listener = new RadioCastConnectListener(Caster, Endpoint); Listener.OnNewClient += (_, eventData) => { Caster.AddRadioClient(eventData.RadioClient); }; }
public RadioCastConnectListener(RadioCaster radioCaster, IPEndPoint endpoint) { RadioCaster = radioCaster; Endpoint = endpoint; TcpListener = CreateTcpListener(endpoint); }
public IcyRadioClient(Stream outputStream, RadioCaster radioCaster) { RadioCaster = radioCaster; OutputStream = new IcyInterceptorStream(outputStream, radioCaster); }