/// <summary> /// Retrieves a TcpImposter along with information about requests made to that /// imposter if mountebank is running with the "--mock" flag. /// </summary> /// <param name="port">The port number of the imposter to retrieve</param> /// <returns>The retrieved imposter</returns> /// <exception cref="MbDotNet.Exceptions.ImposterNotFoundException">Thrown if no imposter was found on the specified port.</exception> /// <exception cref="MbDotNet.Exceptions.InvalidProtocolException">Thrown if the retrieved imposter was not an HTTP imposter</exception> public RetrievedTcpImposter GetTcpImposter(int port) { var imposter = _requestProxy.GetTcpImposter(port); ValidateRetrievedImposterProtocol(imposter, Protocol.Tcp); return(imposter); }