w********r 发帖数: 6 | 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!! |
m*****e 发帖数: 4193 | 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!!
|
w********r 发帖数: 6 | 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.
|
s********k 发帖数: 107 | 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??
|
m*****e 发帖数: 4193 | 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??
|
w********r 发帖数: 6 | 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.
|