int fd = socket(//arguments);
Can this descriptor be passed to another process via IPC and still be valid or is it local to the process that created it?
Yes, file descriptors are local to the process. When a process forks a child, however, the parent and child have the same file descriptor table. This is great because it allows for IO redirection, which is a pretty handy trick.