You could try using the DataAvailable property. It’ll tell you whether there’s anything waiting on the socket. If it’s false, don’t do the Read
call.
More Related Contents:
- Create Dynamic Threads in c# [closed]
- Embedding DLLs in a compiled executable
- Make a borderless form movable?
- How to do constructor chaining in C#
- Correct Way to Load Assembly, Find Class and Call Run() Method
- Alphanumeric sorting using LINQ
- using c# .net libraries to check for IMAP messages from gmail servers [closed]
- How to detect the language of a string?
- How to convert an object to a byte array in C#
- Dynamic Routes from database for ASP.NET MVC CMS
- app.config for a class library
- Serialize a Static Class?
- Float/double precision in debug/release modes
- The ‘await’ operator can only be used within an async lambda expression
- WPF Always On Top
- String to decimal conversion: dot separation instead of comma
- C# – R interface
- WiX – Install Prerequisites and 3rd party applications
- C# System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send
- Display wait or spinner on API call
- Async provider in .NET Core DI
- How to define generic type limit to primitive types?
- What quality level does Image.Save() use for jpeg files?
- How to add ASP.NET Membership Provider in a Empty MVC 4 Project Template?
- Properties.Settings.Default.Save(); -> Where is that file
- When to change the Generate Serialization Assembly value?
- C# null coalescing operator equivalent for c++
- Using generics with XmlSerializer
- Get a service in a IServiceCollection extension
- .NET logging framework [closed]