private void signalToStopCompiling() { if (m_sid == 0) { return; } // Connect to the agent and send signal to stop NamedPipeClientStream pipeClient = new NamedPipeClientStream(".", Config.s_kAgentName); try { pipeClient.Connect(s_kPipeConnectTimeout); } catch (Exception) { return; } MessageStream stream = new MessageStream(new StandardStream(pipeClient)); Message msg = MessageNumber.createMessage(m_sid); if (!stream.writeMessage(msg)) { CConsole.writeError("error: could not send data to the mongcc agent.\n"); } pipeClient.Close(); }
private void handleMessageFreeNum() { int num = m_server.getFreeHandlerNumber(); CConsole.writeInfoLine(string.Format("{0} Recv free num request, send response = {1}", cur(), num)); Message msg = MessageNumber.createMessage(num); m_messageStream.writeMessage(msg); }