Example #1
0
        /// <summary>
        /// Processes the incoming request just read for specified devices.
        /// </summary>
        protected bool ProcessIncomingRequest(IEnumerable <DeviceLogic> devices, byte[] buffer, int offset, int count,
                                              IncomingRequestArgs requestArgs)
        {
            requestArgs.SetToDefault();

            foreach (DeviceLogic deviceLogic in devices)
            {
                ProcessIncomingRequest(deviceLogic, buffer, offset, count, requestArgs);

                if (!requestArgs.NextDevice)
                {
                    break;
                }
            }

            return(!requestArgs.HasError);
        }
Example #2
0
        /// <summary>
        /// Receives an unread incoming request for specified devices.
        /// </summary>
        protected bool ReceiveIncomingRequest(IEnumerable <DeviceLogic> devices, Connection conn,
                                              IncomingRequestArgs requestArgs)
        {
            requestArgs.SetToDefault();

            foreach (DeviceLogic deviceLogic in devices)
            {
                ReceiveIncomingRequest(deviceLogic, conn, requestArgs);

                if (!requestArgs.NextDevice)
                {
                    break;
                }
            }

            return(!requestArgs.HasError);
        }