Exemplo n.º 1
0
 /// <summary>
 /// Start the server
 /// </summary>
 /// <param name="ops">the server options</param>
 public void StartServer(IpcServerOps ops)
 {
     if (ops.m_callBackObj == null)
     {
         throw new ArgumentNullException("callback cannot be null.");
     }
     m_options = ops;
     if (ops.m_numOfWriteBytes <= 0)
     {
         m_options.m_numOfWriteBytes = IpcConf.DEFAULT_WRITE_BUF_SIZE;
     }
     if (ops.m_numOfReadBytes <= 0)
     {
         m_options.m_numOfReadBytes = IpcConf.DEFAULT_READ_BUF_SIZE;
     }
     if (ops.m_maximumInstances <= 0)
     {
         m_options.m_maximumInstances = IpcConf.DEFAULT_PIPE_INSTANCES;
     }
     Start();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Start the server
        /// </summary>
        /// <param name="ops">the server options</param>
		public  void StartServer(IpcServerOps ops)
        {
            if (ops.m_callBackObj == null)
            {
                throw new ArgumentNullException("callback cannot be null.");
            }
            m_options = ops;
            if (ops.m_numOfWriteBytes <= 0)
                m_options.m_numOfWriteBytes = IpcConf.DEFAULT_WRITE_BUF_SIZE;
            if (ops.m_numOfReadBytes <= 0)
                m_options.m_numOfReadBytes = IpcConf.DEFAULT_READ_BUF_SIZE;
            if (ops.m_maximumInstances <= 0)
                m_options.m_maximumInstances = IpcConf.DEFAULT_PIPE_INSTANCES;
            Start();
        }