Run networking code on another thread.