Converted copy_sock_data to private method
Added interrupt handler to stop server on Ctrl-C