コード例 #1
0
ファイル: RadioCaster.cs プロジェクト: henry701/LiterCast
        private async Task RadioStreamTo(IRadioClient client, byte[] buffer, int count)
        {
            if (client.OutputStream.CanWrite == false)
            {
                client.OutputStream.Dispose();
                RadioClients.Remove(client);
                return;
            }
            try
            {
                await client.OutputStream.WriteAsync(buffer, 0, count);

                await client.OutputStream.FlushAsync();
            }
            catch (Exception e)
            {
                LOGGER.Error(e, "Error while writing to client OutputStream!");
                client.OutputStream.Dispose();
                RadioClients.Remove(client);
            }
        }
コード例 #2
0
 public NewClientEventArgs(IRadioClient radioClient)
 {
     RadioClient = radioClient;
 }
コード例 #3
0
ファイル: RadioCaster.cs プロジェクト: henry701/LiterCast
 public void RemoveRadioClient(IRadioClient client)
 {
     RadioClients.Remove(client);
 }
コード例 #4
0
ファイル: RadioCaster.cs プロジェクト: henry701/LiterCast
 public void AddRadioClient(IRadioClient client)
 {
     RadioClients.AddLast(client);
 }