i write a program with socket.
and i have used the function setsockopt(listenfd , SOL_SOCKET , SO_REUSEADDR
, &opt , sizeof(opt)),
but there is still an error "bind error:address already in use"
why?
|
|
0
|
|
|
|
Reply
|
zhengda
|
4/21/2004 2:52:39 PM |
|
In article <c661sj$3uj$2@mail.cn99.com>,
"zhengda" <zhengda1936@sina.com> wrote:
> i write a program with socket.
> and i have used the function setsockopt(listenfd , SOL_SOCKET , SO_REUSEADDR
> , &opt , sizeof(opt)),
> but there is still an error "bind error:address already in use"
> why?
Show us some more code.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
0
|
|
|
|
Reply
|
Barry
|
4/21/2004 3:13:27 PM
|
|
"zhengda" <zhengda1936@sina.com> wrote in message
news:c661sj$3uj$2@mail.cn99.com...
>i write a program with socket.
> and i have used the function setsockopt(listenfd , SOL_SOCKET ,
> SO_REUSEADDR
> , &opt , sizeof(opt)),
> but there is still an error "bind error:address already in use"
> why?
Because the address is in use?
DS
|
|
0
|
|
|
|
Reply
|
David
|
4/21/2004 3:57:35 PM
|
|
"zhengda" <zhengda1936@sina.com> writes:
> i write a program with socket. and i have used the function
> setsockopt(listenfd , SOL_SOCKET , SO_REUSEADDR , &opt ,
> sizeof(opt)), but there is still an error "bind error:address
> already in use" why?
Use netstat to see if the port is already bound by something else.
Joe
--
If people don't want to come out to the ballpark, nobody's going
to stop them.
- Yogi Berra
|
|
0
|
|
|
|
Reply
|
joe
|
4/21/2004 5:32:25 PM
|
|
"zhengda" <zhengda1936@sina.com> wrote in message news:<c661sj$3uj$2@mail.cn99.com>...
> i write a program with socket.
> and i have used the function setsockopt(listenfd , SOL_SOCKET , SO_REUSEADDR
> , &opt , sizeof(opt)),
have you set the var 'opt' to the correct (positive) value?
Calling setsockopt() with opt = 0 is not effective.
-John
|
|
0
|
|
|
|
Reply
|
johngalt__
|
4/23/2004 8:54:58 PM
|
|
|
4 Replies
653 Views
(page loaded in 0.739 seconds)
Similiar Articles: why there is still bind error:address already in use - comp.unix ...i write a program with socket. and i have used the function setsockopt(listenfd , SOL_SOCKET , SO_REUSEADDR , &opt , sizeof(opt)), but there is still ... Bind to port 22 on 0.0.0.0 failed: Address already in use - comp ...Bind to port 22 on 0.0.0.0 failed: Address already in use - comp ... why there is still bind error:address already in use - comp.unix ..... 22 on 0.0.0.0 failed: Address ... bind: Address already in use - comp.unix.solariswhy there is still bind error:address already in use - comp.unix ... i write a program with socket. and i have used the function setsockopt(listenfd , SOL_SOCKET , SO ... Error:(BIND has not been called for (10011)) - comp.lang.clarion ...In the application there is a browse ... 10011)) - comp.lang.clarion ... bind: Address already in use - comp.unix.solaris Error ... while a lot has been done, a lot still Bind Address - comp.protocols.time.ntpwhy there is still bind error:address already in use - comp.unix ... i write a program with socket. and i have used the function setsockopt(listenfd , SOL_SOCKET , SO ... i need help fixing a "cannot bind to address" error - comp ...why there is still bind error:address already in use - comp.unix ... i need help fixing a "cannot bind to address" error - comp ... Bind to port 22 on 0.0.0.0 failed ... read() error - Bad Address - comp.unix.programmer... diff. time, but still, this is kind of bad. ... Out of the three NNTP services I use to read Usenet ... already in use - comp ... why there is still bind error:address ... socket in use ? - comp.protocols.time.ntpwhy there is still bind error:address already in use - comp.unix ... i write a program with socket. and i have used the function setsockopt(listenfd , SOL_SOCKET , SO ... Harvard problem - comp.text.texwhy there is still bind error:address already in use - comp.unix ... Bind: Address Already in Use - Harvard University Bind: Address Already in Use Or How ... of netstat ... shared library path problem - comp.sys.hp.hpuxWhen I run svrmgrl, I get following error: Oracle ... such file or directory ORA-12547: TNS:lost contact SVRMGR> Why ... I don't know why there is probem with svrmgrl's java ... Bind: Address Already in Use - Harvard UniversityBind: Address Already in Use Or How to Avoid this Error when Closing TCP Connections ... can be closed immediately if there ... stuck in TIME_WAIT, but you still can not use ... why there is still bind error:address already in use - comp.unix ...i write a program with socket. and i have used the function setsockopt(listenfd , SOL_SOCKET , SO_REUSEADDR , &opt , sizeof(opt)), but there is still ... 7/23/2012 4:49:59 AM
|