Cosmos/source2/Debug/Cosmos.Debug.Common/CDebugger/DebugConnectorPipeServer.cs
mterwoord_cp 9a8cbd13cc
2009-11-07 13:00:31 +00:00

25 lines
813 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Text;
namespace Cosmos.Debug.Common.CDebugger
{
public class DebugConnectorPipeServer : DebugConnectorStream {
public DebugConnectorPipeServer() {
NamedPipeServerStream xPipe = new NamedPipeServerStream("CosmosDebug", PipeDirection.InOut, 1
, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
xPipe.BeginWaitForConnection(new AsyncCallback(DoWaitForConnection), xPipe);
}
public void DoWaitForConnection(IAsyncResult aResult) {
var xPipe = (NamedPipeServerStream)aResult.AsyncState;
xPipe.EndWaitForConnection(aResult);
Start(xPipe);
}
}
}