Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Want to know about .Net Socket Implementation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Faisal - 14 Mar 2006 11:34 GMT
Hi, People
I 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
Vadym Stetsyak - 16 Mar 2006 14:55 GMT
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

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.