Unix Programming - Socket listen hang

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2005 > Socket listen hang





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Socket listen hang
jessie

2005-10-24, 3:48 pm

I have a Unix C++ socket program that always hang on listen(). nothing
returned, the program stoped there forever. Is there any option I should
apply when compile the program use g++?

I use g++ xx.cpp -lnsl -lsocket -o xx


Thanks


Barry Margolin

2005-10-24, 8:49 pm

In article <dji31c$gi2$1@gist.usc.edu>,
"jessie" <jessiezyt@hotmail.com> wrote:

> I have a Unix C++ socket program that always hang on listen(). nothing
> returned, the program stoped there forever. Is there any option I should
> apply when compile the program use g++?
>
> I use g++ xx.cpp -lnsl -lsocket -o xx


If you want to use a debugger effectively, you should compile with the
-g option.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com