Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ukma!sean From: sean@ms.uky.edu (Sean Casey) Newsgroups: comp.unix.programmer Subject: Re: More questions on sockets Message-ID: <1991Jun18.192652.22692@ms.uky.edu> Date: 18 Jun 91 19:26:52 GMT References: <1991Jun14.162215.14657@ncsu.edu> <1991Jun18.050654.17373@thunder.mcrcim.mcgill.edu> Organization: The Leaning Tower of Patterson Office @ The Univ. of KY Lines: 14 In article <1991Jun14.162215.14657@ncsu.edu>, jwb@cepmax.ncsu.edu (John W. Baugh Jr.) writes: > - when trying to bind a stream socket I sometimes get an error > "Address already in use", even though I've closed the socket (for > example, when I run the program in succession a couple of times). > Is there something else I have to do? This should be in a frequently asked questions list :). Check out the SO_REUSEADDR option for setsockopt(). Hint: use it after socket() and before bind(). Sean -- ** Sean Casey