|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Want to know about .Net Socket ImplementationI have written an ftpclient in .net now a strange thing is happening while debugging every thing is working all right but when i run the program normally the system hangs on socket.receive() can any body give me any clues why this would be happening This is my code snippet Socket clientSocket = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); IPEndPoint Ep=new IPEndPoint(IPAddress.Parse("192.168.1.1"); this.clientSocket.Connect(Ep); byte[] buffer=new byte[512]; // This is the place where i hang when i run my programming but while debugging its all ok int bytesRead=clientSocket.Receive(buffer,buffer.Length,0); Thanks n Regards to All Hello, Faisal!
F> This is my code snippet F> Socket clientSocket = new Socket( AddressFamily.InterNetwork, F> SocketType.Stream, ProtocolType.Tcp ); F> IPEndPoint Ep=new IPEndPoint(IPAddress.Parse("192.168.1.1"); F> this.clientSocket.Connect(Ep); F> byte[] buffer=new byte[512]; F> // This is the place where i hang when i run my programming but while F> debugging its all ok F> int bytesRead=clientSocket.Receive(buffer,buffer.Length,0); read my answer on microsoft.public.win32.programmer.networks |
|||||||||||||||||||||||