replace socket with host and port