Processes a datagram sent to this connection.
436635
public void handleDatagram (InetSocketAddress source, DatagramChannel channel,
        ByteBuffer buf, long when)
    {
        // lazily create our various bits and bobs
        if (_digest == null) {
            try {
                _digest = MessageDigest.getInstance("MD5");
            } catch (NoSuchAlgorithmException nsae) {
                log.warning("Missing MD5 algorithm.");
                return;
            }
            _sequencer = _pcmgr.createDatagramSequencer();
        }

        // verify the hash
        buf.position(12);
        _digest.update(buf);
        byte[] hash = _digest.digest(_datagramSecret);
        buf.position(4);
        for (int ii = 0; ii < 8; ii++) {
            if (hash[ii] != buf.get()) {
                log.warning("Datagram failed hash check", "id", _connectionId, "source", source);
                return;
            }
        }

        // update our target address
        _datagramAddress = source;
        _datagramChannel = channel;

        // read the contents through the sequencer
        try {
            Message msg = _sequencer.readDatagram();
            if (msg == null) {
                return; // received out of order
            }
            msg.received = when;
            _handler.handleMessage(msg);

        } catch (ClassNotFoundException cnfe) {
            log.warning("Error reading datagram", "error", cnfe);

        } catch (IOException ioe) {
            log.warning("Error reading datagram", "error", ioe);
        }
    }
334067
private void processConnectionInfo(CommsByteBuffer buffer, Conversation conversation)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "processConnectionInfo",
                                           new Object[]{buffer, conversation});

      ClientConversationState convState = (ClientConversationState) conversation.getAttachment();

      short connectionObjectId = buffer.getShort();           // BIT16 ConnectionObjectID
      String meName = buffer.getString();                     // STR   MEName

      // Set the connection object ID in the conversation state
      convState.setConnectionObjectID(connectionObjectId);

      // Create the connection proxy and save it away in the conversation state
      final ConnectionProxy connectionProxy;

      // The type of connection proxy we create is dependent on FAP version.  Fap version 5 supports
      // a connection which MSSIXAResourceProvider.  This is done so that PEV (introduced in line with
      // FAP 5) can perform remote recovery of resources.
      if (conversation.getHandshakeProperties().getFapLevel() >= JFapChannelConstants.FAP_VERSION_5)
      {
         connectionProxy = new MSSIXAResourceProvidingConnectionProxy(conversation);
      }
      else
      {
         connectionProxy = new ConnectionProxy(conversation);
      }

      convState.setSICoreConnection(connectionProxy);

      // Set in the ME name
      connectionProxy.setMeName(meName);

      // Now get the unique Id if there was one, and set it in the connection proxy
      short idLength = buffer.getShort();
      if (idLength != 0)
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Got unique id of length:", idLength);

         byte[] uniqueId = buffer.get(idLength);

         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.bytes(tc, uniqueId);

         connectionProxy.setInitialUniqueId(uniqueId);
      }
      else
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "No unique Id was returned");
      }

      // Get the ME Uuid
      String meUuid = buffer.getString();
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "ME Uuid: ", meUuid);
      connectionProxy.setMeUuid(meUuid);

      // Get the resolved User Id
      String resolvedUserId = buffer.getString();
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Resolved UserId: ", resolvedUserId);
      connectionProxy.setResolvedUserId(resolvedUserId);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "processConnectionInfo");
   }
1074787
public void processData() {

        // get number of hands
        float handNum = readbackBuffer.get(0);
        int count = 1;

        boolean rightHandProcessed = false;
        boolean leftHandProcessed = false;

        for (int handCount = 0; handCount < handNum; handCount++) {
            IOHand ioHand;
            HandIODevice device;
            if (handCount == 0) {
                ioHand = rightHand;
                device = rightDevice;
                rightHandProcessed = true;
                GVRSceneObject right = rightHand.getSceneObject();
                if (!right.isEnabled()) {
                    rightHand.getSceneObject().setEnable(true);
                    device.setVisible(true);
                }
            } else {
                ioHand = leftHand;
                device = leftDevice;
                leftHandProcessed = true;
                GVRSceneObject left = leftHand.getSceneObject();
                if (!left.isEnabled()) {
                    leftHand.getSceneObject().setEnable(true);
                    device.setVisible(true);
                }
            }

            //Process Thumbs
            IOFinger ioFinger = ioHand.getIOFinger(IOFinger.THUMB);
            for (int boneNum = 0; boneNum < 4; boneNum++) {
                IOJoint ioJoint = ioFinger.getIOJoint(boneNum + 1);
                if (ioJoint != null) {
                    ioJoint.setPosition(readbackBuffer.get(count), readbackBuffer.get
                            (count + 1), readbackBuffer.get(count + 2));
                }
                count = count + 3;
            }

            setBones(ioFinger);

            if (handCount == 0) {
                // right hand
                for (int fingerNum = 1; fingerNum < 5; fingerNum++) {
                    ioFinger = ioHand.getIOFinger(fingerNum);
                    for (int boneNum = 0; boneNum < 4; boneNum++) {
                        IOJoint ioJoint = ioFinger.getIOJoint(boneNum + 1);
                        if (ioJoint != null) {
                            ioJoint.setPosition(readbackBuffer.get(count), readbackBuffer.get
                                    (count + 1), readbackBuffer.get(count + 2));
                        }
                        count = count + 3;
                    }
                    setBones(ioFinger);
                }
            } else {
                // left hand
                for (int fingerNum = 4; fingerNum > 0; fingerNum--) {
                    ioFinger = ioHand.getIOFinger(fingerNum);
                    for (int boneNum = 0; boneNum < 4; boneNum++) {
                        IOJoint ioJoint = ioFinger.getIOJoint(boneNum + 1);
                        if (ioJoint != null) {
                            ioJoint.setPosition(readbackBuffer.get(count), readbackBuffer.get
                                    (count + 1), readbackBuffer.get(count + 2));
                        }
                        count = count + 3;
                    }
                    setBones(ioFinger);
                }
            }

            //get palm position
            ioHand.getPalmSceneObject().getTransform().setPosition(readbackBuffer.get(count),
                    readbackBuffer.get(count + 1), readbackBuffer.get(count + 2));
            count = count + 3;
            cursorRotation.identity();
            device.process(ioHand.getIOFinger(IOFinger.INDEX).getIOJoint(IOJoint.TIP).getPosition(),
                    cursorRotation);
        }

        if (!rightHandProcessed) {
            GVRSceneObject right = rightHand.getSceneObject();
            if (right.isEnabled()) {
                rightHand.getSceneObject().setEnable(false);
            }
            rightDevice.setVisible(false);
        }
        if (!leftHandProcessed) {
            GVRSceneObject left = leftHand.getSceneObject();
            if (left.isEnabled()) {
                leftHand.getSceneObject().setEnable(false);
            }
            leftDevice.setVisible(false);
        }
    }
332554
def process(self):
        

        while self.running:
            if self._processor_lock.acquire(blocking=False):

                if self.ping_timer:
                    try:
                        self._check_ping()
                    except TimeoutError:
                        log.exception("BitfinexWSS.ping(): TimedOut! (%ss)" %
                                      self.ping_timer)
                    except (WebSocketConnectionClosedException,
                            ConnectionResetError):
                        log.exception("BitfinexWSS.ping(): Connection Error!")
                        self.conn = None
                if not self.conn:
                    # The connection was killed - initiate restart
                    self._controller_q.put('restart')

                skip_processing = False

                try:
                    ts, data = self.receiver_q.get(timeout=0.1)
                except queue.Empty:
                    skip_processing = True
                    ts = time.time()
                    data = None

                if not skip_processing:
                    log.debug("Processing Data: %s", data)
                    if isinstance(data, list):
                        self.handle_data(ts, data)
                    else:  # Not a list, hence it could be a response
                        try:
                            self.handle_response(ts, data)
                        except UnknownEventError:

                            # We don't know what event this is- Raise an
                            # error & log data!
                            log.exception("main() - UnknownEventError: %s",
                                          data)
                            log.info("main() - Shutting Down due to "
                                     "Unknown Error!")
                            self._controller_q.put('stop')
                        except ConnectionResetError:
                            log.info("processor Thread: Connection Was reset, "
                                     "initiating restart")
                            self._controller_q.put('restart')

                self._check_heartbeats(ts)
                self._processor_lock.release()
            else:
                time.sleep(0.5)
134270
protected void processData(Collection<RI> data) {
        // Check data against all rules
        for (Rule<Collection<RI>, RO> rule : rules) {
            processResult(rule.validate(data));
        }
    }
829107
private void processEncodedPayload() throws IOException {
    if (!readPayload) {
      payloadSpanCollector.reset();
      collect(payloadSpanCollector);
      Collection<byte[]> originalPayloadCollection = payloadSpanCollector
          .getPayloads();
      if (originalPayloadCollection.iterator().hasNext()) {
        byte[] payload = originalPayloadCollection.iterator().next();
        if (payload == null) {
          throw new IOException("no payload");
        }
        MtasPayloadDecoder payloadDecoder = new MtasPayloadDecoder();
        payloadDecoder.init(startPosition(), payload);
        mtasPosition = payloadDecoder.getMtasPosition();
      } else {
        throw new IOException("no payload");
      }
    }
  }
480726
@SuppressWarnings("resource")
  public void run() {
    Thread.currentThread().setPriority(Thread.MAX_PRIORITY-1);
    DatagramChannel sock = H2O._udpSocket, errsock = null;
    boolean saw_error = false;

    while( true ) {
      try {
        // Cleanup from any prior socket failures.  Rare unless we're really sick.
        if( errsock != null ) { // One time attempt a socket close
          final DatagramChannel tmp2 = errsock; errsock = null;
          tmp2.close();       // Could throw, but errsock cleared for next pass
        }
        if( saw_error ) Thread.sleep(1000); // prevent deny-of-service endless socket-creates
        saw_error = false;

        // ---
        // Common-case setup of a socket
        if( sock == null ) {
          sock = DatagramChannel.open();
          sock.socket().bind(H2O.SELF._key);
        }

        // Receive a packet & handle it
        basic_packet_handling(new AutoBuffer(sock));

      } catch( java.nio.channels.AsynchronousCloseException ex ) {
        break;                  // Socket closed for shutdown
      } catch( java.nio.channels.ClosedChannelException ex ) {
        break;                  // Socket closed for shutdown
      } catch( Exception e ) {
        // On any error from anybody, close all sockets & re-open
        Log.err("UDP Receiver error on port "+H2O.H2O_PORT,e);
        saw_error = true;
        errsock  = sock ;  sock  = null; // Signal error recovery on the next loop
      }
    }
  }
977779
protected void processAuthedConnections (long iterStamp)
    {
        AuthingConnection conn;
        while ((conn = _authq.getNonBlocking()) != null) {
            try {
                // construct a new running connection to handle this connections network traffic
                // from here on out
                PresentsConnection rconn = new PresentsConnection();
                rconn.init(this, conn.getChannel(), iterStamp);
                rconn.selkey = conn.selkey;

                // we need to keep using the same object input and output streams from the
                // beginning of the session because they have context that needs to be preserved
                rconn.inheritStreams(conn);

                // replace the mapping in the handlers table from the old conn with the new one
                _handlers.put(rconn.selkey, rconn);

                // add a mapping for the connection id and set the datagram secret
                _connections.put(rconn.getConnectionId(), rconn);
                rconn.setDatagramSecret(conn.getAuthRequest().getCredentials().getDatagramSecret());

                // transfer any overflow queue for that connection
                OverflowQueue oflowHandler = _oflowqs.remove(conn);
                if (oflowHandler != null) {
                    _oflowqs.put(rconn, oflowHandler);
                }

                // and let the client manager know about our new connection
                _clmgr.connectionEstablished(rconn, conn.getAuthName(), conn.getAuthRequest(),
                                             conn.getAuthResponse());

            } catch (IOException ioe) {
                log.warning("Failure upgrading authing connection to running.", ioe);
            }
        }
    }
854145
@Override
    public void processMessage() {
        // since our computations are symmetric - we aggregate dot everywhere
        if (chunks == null) {
            chunks = new TreeMap<>();
            chunksCounter = new AtomicInteger(1);
            addToChunks(payload);
        }

        clipboard.pin(this);

        //log.info("sI_{} dot aggregation received", transport.getShardIndex());

        if (clipboard.isReady(this.getOriginatorId(), this.getTaskId())) {
            trainer.aggregationFinished(clipboard.unpin(this.getOriginatorId(), this.taskId));
        }
    }
642969
@Override
    public void processConnect(WebSocketChannel channel, WSURI location, String[] protocols) {
        nextHandler.processConnect(channel, location, protocols);
    }
782994
void process(ByteChannel sock, AutoBuffer ab) throws IOException {
        int requestType = ab.get1();
        switch (requestType) {
            case CREATE_FRAME:
                ExternalFrameWriterBackend.handleWriteToChunk(sock, ab);
                break;
            case DOWNLOAD_FRAME:
                ExternalFrameReaderBackend.handleReadingFromChunk(sock, ab);
                break;
        }
    }
65691
@Override
    public void processMessage() {
        VectorAggregation aggregation = new VectorAggregation(rowIndex, (short) voidConfiguration.getNumberOfShards(),
                        getShardIndex(), storage.getArray(key).getRow(rowIndex).dup());
        aggregation.setOriginatorId(this.getOriginatorId());

        clipboard.pin(aggregation);

        DistributedVectorMessage dvm = new DistributedVectorMessage(key, rowIndex);
        dvm.setOriginatorId(this.originatorId);

        if (voidConfiguration.getNumberOfShards() > 1)
            transport.sendMessageToAllShards(dvm);
        else {
            aggregation.extractContext(this);
            aggregation.processMessage();
        }
    }
425278
def datagram_received(self, data, addr):
        '''
        
        '''
        message = salt.utils.stringutils.to_unicode(data)
        if message.startswith(self.signature):
            try:
                timestamp = float(message[len(self.signature):])
            except (TypeError, ValueError):
                self.log.debug(
                    'Received invalid timestamp in package from %s:%s',
                    *addr
                )
                if self.disable_hidden:
                    self._sendto('{0}:E:{1}'.format(self.signature, 'Invalid timestamp'), addr)
                return

            if datetime.datetime.fromtimestamp(timestamp) < (datetime.datetime.now() - datetime.timedelta(seconds=20)):
                if self.disable_hidden:
                    self._sendto('{0}:E:{1}'.format(self.signature, 'Timestamp is too old'), addr)
                self.log.debug('Received outdated package from %s:%s', *addr)
                return

            self.log.debug('Received "%s" from %s:%s', message, *addr)
            self._sendto(
                salt.utils.stringutils.to_bytes(str('{0}:@:{1}').format(  # future lint: disable=blacklisted-function
                    self.signature,
                    salt.utils.json.dumps(self.answer, _json_module=_json)
                )),
                addr
            )
        else:
            if self.disable_hidden:
                self._sendto(
                    salt.utils.stringutils.to_bytes(
                        '{0}:E:{1}'.format(self.signature, 'Invalid packet signature'),
                        addr
                    )
                )
            self.log.debug('Received bad signature from %s:%s', *addr)
621030
def process_data(self, block):
        """"""
        if hasattr(block, 'send_destinations') and block.send_destinations:
            self.fire(events.FileProcessed(block))
            self._log_in_db(block)
            if self._sent_log_file:
                self._log_in_sent_log(block)
            self.log.info("Sent to '%s' file '%s' containing files: %s",
                          str(block.send_destinations),
                          block.processed_data_file_info.basename,
                          str([file_info.path for file_info in block.content_file_infos]))
        else:
            self.log.info("File %s wasn't sent", block.processed_data_file_info.basename)
        return block
222088
def process(ctx, dataset, kwargs):
    ""

    kwargs = parse_kwargs(kwargs)
    data(dataset, **ctx.obj).process(**kwargs)
783420
def send(self, data: bytes = b""):
        
        self.input.extend(data)
        self._process()
798649
private function processConnection()
	{
		$builder = $this->getContainerBuilder();

		$connection = $builder->addDefinition($this->prefix('connection'))
			->setClass(Connection::class)
			->setFactory(DriverManager::class . '::getConnection', [$this->config['connection']]);
	}