You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
962 B
C#
35 lines
962 B
C#
using IPCLib;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RunWellSectionApp
|
|
{
|
|
public class IpcPipeClass
|
|
{
|
|
public string m_pipeId = "";
|
|
|
|
public PipeManager m_Pipe;
|
|
public bool m_bUsePipe = false;
|
|
public Process m_process;
|
|
public int m_heartbeatTimeoutCount = 0;
|
|
public IpcPipeClass()
|
|
{
|
|
Guid tGuid = Guid.NewGuid();
|
|
m_pipeId = tGuid.ToString();
|
|
}
|
|
|
|
public void InitUsePiple( Action<PipeMessage> tMessageReceived, Action<bool> tConnectionStatusChanged, Action tHeartbeatTimeout)
|
|
{
|
|
m_Pipe = new PipeManager(m_pipeId, true);
|
|
|
|
m_Pipe.MessageReceived += tMessageReceived;
|
|
m_Pipe.ConnectionStatusChanged += tConnectionStatusChanged;
|
|
m_Pipe.HeartbeatTimeout += tHeartbeatTimeout;
|
|
; }
|
|
}
|
|
}
|