Hello!
I'm doing a client server application via TCP/IP and I need to transfer files: while the client transfers chunks of data, it waits for an acknowledge from the server, by doing this:
It means that it waits 1 byte from the server, then it goes on.
However if for some reason the server does not send the acknowledge to the client, this instruction blocks the application...
Is there another way to get an acknowledge without the risk of freezing the thread/application ?
Thanks
I'm doing a client server application via TCP/IP and I need to transfer files: while the client transfers chunks of data, it waits for an acknowledge from the server, by doing this:
Code:
netStream.Read(data, 0, 1);
It means that it waits 1 byte from the server, then it goes on.
However if for some reason the server does not send the acknowledge to the client, this instruction blocks the application...
Is there another way to get an acknowledge without the risk of freezing the thread/application ?
Thanks