Transferring files over TCP with CopyTo()
问题 I have a question regarding the CopyTo() method of the Stream class: https://docs.microsoft.com/en-us/dotnet/api/system.io.stream.copyto This approach works for small file circa 15kb as I tried it, but anything higher (I tested with 2mbs, 4 mbs and so on) and it just hangs on the CopyTo() method. Can't really figure out why. Code sample: Server's handle client : public void HandleClient(object c) { string path = "some path"; using (TcpClient client = (TcpClient)c) { using (NetworkStream