예제 #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
         }
     }
 }