In C there is an atexit function that takes no arguments. Because of
this, you can't pass in the
file descriptors for your sockets. Uge! Short of making these integers
global, how can I close
these sockets on premature program termination?
int client=0,server=0;
void exiting()
{
close(client);
close(server);
}
int main(void)
{
atexit(exiting);
struct sockaddr...
}
Note that there are a bunch of includes for TCP sockets and a lot more
code.
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug