End Google Ads 201810 - BS.net 01 --> Hello,

i have a simple Client/Server Application. You know, to read data or Accept TCPClients (in TCPListener) i need some loops which waits for data or for incoming connections.

My Problem now... i have not a lot of Connections now (since now), but i have a CPU Usage of 99% when i start my applications. So i decided to put into the loops a "Thread.Sleep(100)" Command. But that doesn't help very well... And if i let my threads sleep for maybe 300 milliseconds, i get exceptions, because the client couldn't create a connection or i get exceptions because the TCPClient "isn't available"...

So, how do i can here avoid these huge CPU Usage... i mean, other server-applications and client-applications really doesn't need all my CPU Power

Many Thanks