public virtual void Start(int port, bool isWriteLog = false, bool isWriteBoard = false) { SynchronizeStopper.Reset(); IsWriteLog = isWriteLog; IsWriteBoard = isWriteBoard; Task.Run(() => ipc.Start(port)); { var proc = System.Diagnostics.Process.GetCurrentProcess(); ipc.Write(DataKind.Connect, new Connect(ProgramKind.AI) { ProcessId = proc.Id }); proc.Dispose(); } Log("[IPC] Sended Connect"); }
public override void Start() { base.Start(); var net = new NetManager(); net.Init(port); var ipc = new IPCManager(); ipc.Init(id); ipc.Start(); m_context = new ServerContext(); m_context.net = net; m_context.ipc = ipc; OnlineManager.Instance.Init(m_context); RoomManager.Instance.Init(m_context); ConsoleInput.onInputLine.AddListener(OnInputLine); ConsoleInput.onInputKey.AddListener(OnInputKey); }
public override void Start() { base.Start(); FSPSession.ActiveTimeout = 10;//将超时时间设为10秒,以测试 var fsp = new FSPManager(); fsp.Init(port); var ipc = new IPCManager(); ipc.Init(id); ipc.Start(); m_context = new ServerContext(); m_context.fsp = fsp; m_context.ipc = ipc; GameManager.Instance.Init(m_context); ConsoleInput.onInputLine.AddListener(OnInputLine); ConsoleInput.onInputKey.AddListener(OnInputKey); }