SpeechRecognizer.UDPClient.StopClient C# (CSharp) Méthode

StopClient() public méthode

Tells the UDP client to stop listening for packets.
public StopClient ( ) : void
Résultat void
        public void StopClient()
        {
            // Set the boolean to false to stop the asynchronous packet receiving
            listening = false;
            client.Close();
            audioStream.Close();
            //client.EndReceive(currentReceive, ref endPoint);
            Console.WriteLine(" [UDPClient] Stopped listening on port " + port);
        }