Used by client applications to communicate with server ones by using named pipes.
상속: APipeConnection
예제 #1
0
파일: SendCommand.cs 프로젝트: rsdn/janus
		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>");
				}
		}