Socket
-
Hi i am using following code to connect to ftp server on my own pc. socket.Connect(endpoint); then i m calling following code to read response. noofbytes = clientSocket.Receive( buffer, buffer.Length, 0 ); when i m calling this sometimes, program hangs, it does not hang when i m debugging. so i have added System.Threading.Thread.Sleep(20) to sleep program, now its working, i want to know the reason program is hanging, and also i used 20 milliseconds after experiment. it may change on different machines. Shajeel
-
Hi i am using following code to connect to ftp server on my own pc. socket.Connect(endpoint); then i m calling following code to read response. noofbytes = clientSocket.Receive( buffer, buffer.Length, 0 ); when i m calling this sometimes, program hangs, it does not hang when i m debugging. so i have added System.Threading.Thread.Sleep(20) to sleep program, now its working, i want to know the reason program is hanging, and also i used 20 milliseconds after experiment. it may change on different machines. Shajeel
try reading in smaller chunks 60% of statistics are made up on the spot