Example #1
0
		public Pipe(string uri)
		{
			Settings = new PipeSettings();
			var u = new Uri(uri);
			Settings.HostName = u.Host;
			Settings.Port = u.Port;
			Settings.BasePath = u.PathAndQuery;
			timer = new Timer((s) => _end(), null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
		}
Example #2
0
		public ProxyPipe(NodeMap<LocalNode> locals, string uri)
		{
			Settings = new PipeSettings();
			var u = new Uri(uri);
			Settings.HostName = u.Host;
			Settings.Port = u.Port;
			Settings.BasePath = u.PathAndQuery;
			Nodes = new JArray(locals.Nodes.Select(node => new JObject(new JProperty("name", node.Name), new JProperty("classes", node.Classes)))).ToString();
			var listen = Task.Run(() => _listen());
		}