avatar
help! cannot bind to socket!# Unix - 噫吁兮,危乎高哉
w*r
1
look at the code.
I compare it with the example program words by words.
and I have tried -lsocket -lsnl in linking.
(of course, the system says there is no such file or directory.
BTW, all the socket and bind are system calles. need to link
socket library?)
does not work at all.
I typed the error message, it says: the address is already
in use.
following is the code. thanks a lot!!
avatar
m*e
2
So the answer is very clear: address is already in use. Try to bind a free
port.

【在 w********r 的大作中提到】
: look at the code.
: I compare it with the example program words by words.
: and I have tried -lsocket -lsnl in linking.
: (of course, the system says there is no such file or directory.
: BTW, all the socket and bind are system calles. need to link
: socket library?)
: does not work at all.
: I typed the error message, it says: the address is already
: in use.
: following is the code. thanks a lot!!

avatar
w*r
3
rhe port is not used. I have changed the
HTTPD port to 81 already
I still can not use 80??

【在 m*****e 的大作中提到】
: So the answer is very clear: address is already in use. Try to bind a free
: port.

avatar
s*k
4
Try 4000. 80 is used for system, usually is http.

【在 w********r 的大作中提到】
: rhe port is not used. I have changed the
: HTTPD port to 81 already
: I still can not use 80??

avatar
m*e
5
try telnet to that port you are trying to bind, and see whether you get
a Connection refused error.

【在 w********r 的大作中提到】
: rhe port is not used. I have changed the
: HTTPD port to 81 already
: I still can not use 80??

avatar
w*r
6
I tried.
error msg:
Could not open a connection to host on port 80 :
Connect failed
whatis the meaning? the port is not in used at all, right?

【在 m*****e 的大作中提到】
: try telnet to that port you are trying to bind, and see whether you get
: a Connection refused error.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。