Exemplo n.º 1
0
 public IcyInterceptorStream(Stream stream, RadioCaster radioCaster)
 {
     UnderlyingStream = stream;
     RadioCaster      = radioCaster;
     // First thing that should be sent is the metadata though
     // InterceptedBytes = RadioCaster.RadioInfo.MetadataInterval;
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 4
0
 public IcyRadioClient(Stream outputStream, RadioCaster radioCaster)
 {
     RadioCaster  = radioCaster;
     OutputStream = new IcyInterceptorStream(outputStream, radioCaster);
 }