Used by client applications to communicate with server ones by using named pipes.
Наследование: APipeConnection
Пример #1
0
		private void Send(string msg)
		{
			using (var cpc = new ClientPipeConnection("JanusPipe"))
			{
				cpc.Connect();
				cpc.Write(msg);
			}
		}
Пример #2
0
		public Resource GetData(string uri)
		{
			using (var cpc = new ClientPipeConnection(_pipeName))
				try
				{
					cpc.Connect();
					cpc.Write("<protocol-request><path>" + uri + "</path></protocol-request>");
					return Resource.Unpack(cpc.ReadBytes());
				}
				catch (Exception e)
				{
					return new Resource(MediaTypeNames.Text.Html,
						"<html><h3>Ошибка. Источник данных не обнаружен. Возможно RSDN@Home не запущен." +
							"</h3><pre style='background-color: #EEEEEE'>" + e + "</pre></html>");
				}
		}