Examples of processPacket()


Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()

  @Test
  public void test() {

    GotAllPoint member = new GotAllPoint("129.12.23.12:9089", 3);

    Assert.assertTrue(member.processPacket(1234));
    Assert.assertTrue(member.processPacket(1235));
    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());
View Full Code Here

Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()

  public void test() {

    GotAllPoint member = new GotAllPoint("129.12.23.12:9089", 3);

    Assert.assertTrue(member.processPacket(1234));
    Assert.assertTrue(member.processPacket(1235));
    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());
View Full Code Here

Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()

    GotAllPoint member = new GotAllPoint("129.12.23.12:9089", 3);

    Assert.assertTrue(member.processPacket(1234));
    Assert.assertTrue(member.processPacket(1235));
    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());

    Assert.assertFalse(member.processPacket(1234));
View Full Code Here

Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()

    Assert.assertTrue(member.processPacket(1236));

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());

    Assert.assertFalse(member.processPacket(1234));

    Assert.assertTrue(member.processPacket(1239));
    List<Long> missingPackets = member.getMissingPackets();
    Assert.assertEquals(2, missingPackets.size());
View Full Code Here

Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()

    Assert.assertEquals(1236l, member.getGotAllPoint());
    Assert.assertEquals(0, member.getMissingPackets().size());

    Assert.assertFalse(member.processPacket(1234));

    Assert.assertTrue(member.processPacket(1239));
    List<Long> missingPackets = member.getMissingPackets();
    Assert.assertEquals(2, missingPackets.size());

    Assert.assertTrue(missingPackets.contains(1237l));
    Assert.assertTrue(missingPackets.contains(1238l));
View Full Code Here

Examples of com.avaje.ebeaninternal.server.cluster.mcast.IncomingPacketsProcessed.GotAllPoint.processPacket()

    Assert.assertTrue(missingPackets.contains(1238l));

    Assert.assertEquals(1236l, member.getGotAllPoint());

    // get a missing packet
    Assert.assertTrue(member.processPacket(1237));
    Assert.assertEquals(1237l, member.getGotAllPoint());

    missingPackets = member.getMissingPackets();
    Assert.assertEquals(1, missingPackets.size());
    Assert.assertTrue(missingPackets.contains(1238l));
View Full Code Here

Examples of com.comphenix.protocol.injector.player.NetworkObjectInjector.processPacket()

  void processPacket(Player player, Object mcPacket) throws IllegalAccessException, InvocationTargetException {
    NetworkObjectInjector networkObject = getInjector(player, true);
   
    // We will always ignore this packet
    ignoredPackets.add(mcPacket);
    networkObject.processPacket(mcPacket);
  }

  @SuppressWarnings({"unchecked", "rawtypes"})
  private void cleanupListener() {
    Class<?> listenerClass = getSpigotListenerClass();
View Full Code Here

Examples of org.jivesoftware.smack.PacketListener.processPacket()

        DataPacketExtension dpe = new DataPacketExtension(sessionID, 123, base64Data);
        Message dataMessage = new Message();
        dataMessage.addExtension(dpe);

        // add data packets
        listener.processPacket(dataMessage);

        // read until exception is thrown
        try {
            inputStream.read();
            fail("exception should be thrown");
View Full Code Here

Examples of org.jivesoftware.smack.PacketListener.processPacket()

            String base64Data = StringUtils.encodeBase64(controlData, i * blockSize, blockSize,
                            false);
            DataPacketExtension dpe = new DataPacketExtension(sessionID, i, base64Data);
            Message dataMessage = new Message();
            dataMessage.addExtension(dpe);
            listener.processPacket(dataMessage);
        }

        byte[] bytes = new byte[3 * blockSize];
        int read = 0;
        read = inputStream.read(bytes, 0, blockSize);
View Full Code Here

Examples of org.jivesoftware.smack.PacketListener.processPacket()

            String base64Data = StringUtils.encodeBase64(controlData, i * blockSize, blockSize,
                            false);
            DataPacketExtension dpe = new DataPacketExtension(sessionID, i, base64Data);
            Message dataMessage = new Message();
            dataMessage.addExtension(dpe);
            listener.processPacket(dataMessage);
        }

        // read data
        byte[] bytes = new byte[3 * blockSize];
        for (int i = 0; i < bytes.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.