socket bind
-
hallo leute,
wie kann man unter linux beim int bind(int s, const struct sockaddr *addr, socklen_t addrlen);
eine fehlerauswertung machen? der rueckgabewert ist -1 dh irgendwo gibts einen fehler...aber nur wo...bye
-
If the bind is successful, a 0 value is returned. A return value of -1 indicates an error, which is further specified in the global errno.
-
hab gerade gelesen:
bind() returns the following values:
0Successful completion.
-1Failure. errno is set to indicate the error.
bei mir zeit errno nun folgendes an:
Cannt access memory at address 0x8 ...was kann das sein?
-
oh das ist noch was anderes von vorher...
print("%s", errno);
muesste gehen?
-
ajax schrieb:
oh das ist noch was anderes von vorher...
print("%s", errno);
muesste gehen?
??? schnon mal von man: perror(3) oder man: strerror(3) gehört?
ernno ist auch eine int Variable!