I have been playing around with some socket code under
Solaris 2.4 x86 which I cannot get to work.
The code is very straight forward, from "Unix Network Programming"
by W. Richard Stevens. I've used the code before on other platforms,
and it of course worked.
I create the socket:
sockfd=socket(AF_INET, SOCK_STREAM, 0);
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr=htonl(INADDR_ANY);
serv_addr.sin_port = htons(SERVER_PORT);
bind(sockfd, (struct sockaddr *)&serv_addr, sizeof serv_addr);
----
The call to socket() works, bind fails and sets errno to 22.
Is there something different I need to do w/Solaris, or am I
missing something?
Thanks
Joe