示例#1
0
 public void OnThread()
 {
     while (true)
     {
         try
         {
             RecodeUtil.WavesRecodeFromQueue(FStream, WaveSerializer, WavesQueue);
         }
         catch (Exception ex)
         {
             //TODO Write Log
         }
     }
 }
示例#2
0
 public void OnThread()
 {
     while (true)
     {
         Server.Bind(new IPEndPoint(IPAddress.Any, Port));
         Server.Listen(5);
         Socket client = Server.Accept();
         try
         {
             while (client.Connected)
             {
                 var stream = new NetworkStream(client);
                 RecodeUtil.WavesRecodeFromQueue(stream, WaveSerializer, WavesQueue);
             }
             client.Shutdown(SocketShutdown.Both);
             client.Close();
         }
         catch (SocketException se)
         {
             //TODO Write Log
         }
     }
 }