Socket is nolonger created in main thread.