This is probably a painfully basic question, but these are usually the hard ones to google for. I know on linux that STDIN has a file descriptor of 0, but does that bear any relevance to the port number? Port is machine-specific, whereas file descriptors are program specific, aren't they? Don't ask me how I've managed anything without knowing this.