c# - To find amount of data available in socket -


How can we find the number of bytes available in the socket in the socket without using "socket available". Can anyone help me out?

socket. Available very close you will be here, but it still tells you that instead of distributing the socket, is available locally . IMO, The most reliable method here is to implement your network code so that you know how much data is required (in advance, maybe with just a length marker), and then (for example) async Use the stream - the readings to pull that data from that socket, unless you absolutely use that data, or you simply answer "how much I expect" timeout then "how much basically i hope Th "-" I have read so far. "


Comments