Inheritance: System.ServiceModel.ServiceHost
        public bool OpenService()
        {
            this.streamServerHost = new StreamServerHost();

            var ep = streamServerHost.AddServiceEndpoint(typeof(IDataExchange), streamBinding, endpointRole, endpointVia);

            ep.Behaviors.Add(relayCreds);

            try
            {
                streamServerHost.Open();
                streamServerHost.BeginAccept(StreamAccepted, null);
            }
            catch (Exception e)
            {
                Trace.TraceError("Unable to connect: {0}", e.Message);
                return(false);
            }
            return(true);
        }
        public bool OpenService()
        {
            this.streamServerHost = new StreamServerHost();

            var ep = streamServerHost.AddServiceEndpoint(typeof(IDataExchange), streamBinding, endpointRole, endpointVia);
            ep.Behaviors.Add(relayCreds);

            try
            {
                streamServerHost.Open();
                streamServerHost.BeginAccept(StreamAccepted, null);
            }
            catch (Exception e)
            {
                Trace.TraceError("Unable to connect: {0}", e.Message);
                return false;
            }
            return true;
        }