mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
This commit is contained in:
parent
9f2a17fc0f
commit
33909617fb
1 changed files with 11 additions and 8 deletions
|
|
@ -7,16 +7,19 @@ using System.Text;
|
|||
|
||||
namespace Cosmos.Debug.VSDebugEngine {
|
||||
|
||||
public class DebugWindows {
|
||||
static public class DebugWindows {
|
||||
static protected NamedPipeClientStream mPipe;
|
||||
static protected StreamWriter mWriter;
|
||||
|
||||
public static void Test(string aData) {
|
||||
using (var xPipe = new NamedPipeClientStream(".", "CosmosDebugWindows", PipeDirection.Out)) {
|
||||
xPipe.Connect();
|
||||
using (var xWriter = new StreamWriter(xPipe)) {
|
||||
xWriter.WriteLine(aData);
|
||||
}
|
||||
xPipe.Flush();
|
||||
static public void SendCommand(byte aCmd, byte[] aData) {
|
||||
if (mPipe == null) {
|
||||
mPipe = new NamedPipeClientStream(".", "CosmosDebugWindows", PipeDirection.Out);
|
||||
mPipe.Connect();
|
||||
mWriter = new StreamWriter(mPipe);
|
||||
}
|
||||
mWriter.Write(aCmd);
|
||||
mWriter.Write(aData);
|
||||
mPipe.Flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue