feature. I am asking if that is normal,
> > or whether I forgot something.
> >
> > If I run the program it does fine. If I then kill the program (after it
> > has accepted connections), and then run the program again, the bind
> > function fails to work, and I get a m
program (after it
> has accepted connections), and then run the program again, the bind
> function fails to work, and I get a message like "Could not bind" (see
> program below). If I wait a while, like a minute or two, then the
> program will work again. Is this normal behav
run the program again, the bind
| function fails to work, and I get a message like "Could not bind" (see
| program below). If I wait a while, like a minute or two, then the
| program will work again. Is this normal behavior, or did I miss
| something?
[ snip ]
This is normal behav
Stephen Montgomery-Smith wrote:
> listenfd=socket(AF_INET,SOCK_STREAM,0);
> bzero(&servaddr,sizeof(servaddr));
> servaddr.sin_family=AF_INET;
> servaddr.sin_addr.s_addr=htonl(INADDR_ANY);
> servaddr.sin_port=htons(3000);
> if (bind(listenfd,(struct sockaddr*)&servaddr,sizeof(servaddr)
ction fails to work, and I get a message like "Could not bind" (see
> program below). If I wait a while, like a minute or two, then the
> program will work again. Is this normal behavior, or did I miss
> something?
>
> I got the programming style from Richard Steven
program again, the bind
function fails to work, and I get a message like "Could not bind" (see
program below). If I wait a while, like a minute or two, then the
program will work again. Is this normal behavior, or did I miss
something?
I got the programming style from Richard Steven's
6 matches
Mail list logo