move socket creation to when ready to call send