createRemoteSocket now returns a struct.