Setting socket_select to 'null' instead of '0' boosts performance tremendously.

...diately. This makes the while loop spin continuously and it chews up CPU like a mother.

Setting it to NULL makes it block indefinitely. As a result, it no longer chews up 100% of CPU.