# ViDi2.Runtime.Remote.Client.Http.HttpControl

To connect to a remote service, you must first instantiate a ViDi2.Runtime.Remote.Client.Control, and then connect to the service.

Methods
Control(IImageFactory imageFactory) | Creates a client runtime control with the given IImageFactory, which will be used to load images received from the service. Unlike a local control, there is no need to pass in a LibraryAccess object – the remote control automatically creates and uses a remote LibraryAccess object. In general, a remote control can be used transparently wherever you would normally use a local control.
void Connect(string uri) | Connects to the given uri, where the uri corresponds to a valid VisionPro Deep Learning service. The uri should be in the form "http://<ip>:<port>" where <ip> and <port> correspond to your VisionPro Deep Learning service. This should correspond to the --http-address=http://address:port command line parameter setting. This method may throw a TimeoutException if the service doesn't respond. It may also throw exceptions if the control is already connected to a service, or if the service is a training service while the control is a runtime control. If connection fails in this way, the control should be disposed, and re-connection should be attempted with a new control. The number of instantiated controls is not limited in a process, however, each process is only allowed to connect one control to each specific service running.
Properties
string ServiceUri | The uri to which the control is currently connected, or null if the control isn't connected to a service.
bool IsConnected | Returns true after Connect has been called successfully.
IServiceInfos ServiceInfos | Returns information about the service to which the control is connected. Available after Connect has been called successfully.
IConnectionMonitor ConnectionMonitor | Returns an object that periodically pings the service, starting after Connect has been called successfully. The events published by this object allow subscribers to monitor the control's connection with the service.