Hi, I am familiar with the select function from c++.
I wanted to know if someone knows a way to listen to a socket for example with a something like the select function (that has a timeout as well).
I need to receive unknown sized data from a socket in a non-blocking way , Therefore I am not sure that using "Socket.BeginReceive" is the best solution for me, because I will want to receive each time one byte because I dont know the data size, which results alot of callbacks.
I dont want to use "Socket.Receive" because its a blocking function and then in case that I will want to cancel the working thread it will be a problem.
Is there a way to do something like "select" that blocks for a requested time, or until data received?
Does someone have some other solution to recommend me? Thanks!
I wanted to know if someone knows a way to listen to a socket for example with a something like the select function (that has a timeout as well).
I need to receive unknown sized data from a socket in a non-blocking way , Therefore I am not sure that using "Socket.BeginReceive" is the best solution for me, because I will want to receive each time one byte because I dont know the data size, which results alot of callbacks.
I dont want to use "Socket.Receive" because its a blocking function and then in case that I will want to cancel the working thread it will be a problem.
Is there a way to do something like "select" that blocks for a requested time, or until data received?
Does someone have some other solution to recommend me? Thanks!