Examples of PingMessage


Examples of com.sun.jini.test.spec.jeri.mux.util.PingMessage

            throw new TestException("Message from the server"
                + " was not received properly");
        }
        //Verify ping
        short cookie = (short) 0x8080;
        PingMessage pm = new PingMessage();
        pm.setCookie(cookie).send(os);
        PingAckMessage pam = new PingAckMessage();
        try {
            pam.setCookie(cookie).receive(is,getTimeout());
        } catch (ProtocolException e) {
            e.printStackTrace();
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.mux.util.PingMessage

        } catch (ProtocolException e) {
            e.printStackTrace();
            throw new TestException(e.getMessage(),e);
        }
                //Ping the server
        PingMessage pm = new PingMessage().setCookie((short)0x5544);
        pm.send(os);
        //Receive a ping ack from server and verify that the correct cookie
        //is included
        se = getServerEndpoint();
        service = new TestServiceImpl();
        exporter = new BasicJeriExporter(se,
View Full Code Here

Examples of de.creepsmash.common.messages.server.PingMessage

        this.client.disconnect();
      } catch (SocketTimeoutException e) {
        if (!timeout) {
          logger.info("Client " + this.client.getClientID() + ": timeout -- sending PING");
          timeout = true;
          this.client.send(new PingMessage());
          continue;
        }
        logger.info("Client " + this.client.getClientID() + ": timeout -- got no response to PING");
        this.client.disconnect();
      } catch (IOException e) {
View Full Code Here

Examples of de.creepsmash.common.messages.server.PingMessage

      messageObject = new KickedMessage();
    } else if (KickPlayerResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new KickPlayerResponseMessage();
    } else if (PingMessage.PATTERN.matcher(messageString).matches()) {
      messageObject = new PingMessage();
    } else if (UpdateDataResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
      messageObject = new UpdateDataResponseMessage();
    } else if (ScoreResponseMessage.PATTERN.matcher(messageString)
        .matches()) {
View Full Code Here

Examples of net.glowstone.net.message.play.game.PingMessage

        // let us know if the client has timed out yet
        if (readTimeoutCounter >= TIMEOUT_TICKS) {
            if (pingMessageId == 0 && getProtocol() instanceof PlayProtocol) {
                pingMessageId = random.nextInt();
                send(new PingMessage(pingMessageId));
            } else {
                disconnect("Timed out");
            }
            readTimeoutCounter = 0;
        }

        // let the client know we haven't timed out yet
        if (writeTimeoutCounter >= TIMEOUT_TICKS && getProtocol() instanceof PlayProtocol) {
            pingMessageId = random.nextInt();
            send(new PingMessage(pingMessageId));
        }
    }
View Full Code Here

Examples of net.glowstone.net.message.play.game.PingMessage

import java.io.IOException;

public final class PingCodec implements Codec<PingMessage> {
    @Override
    public PingMessage decode(ByteBuf buffer) throws IOException {
        return new PingMessage(ByteBufUtils.readVarInt(buffer));
    }
View Full Code Here

Examples of net.lightstone.msg.PingMessage

  }

  @Override
  public void pulse() {
    super.pulse();
    session.send(new PingMessage());

    streamBlocks();

    for (Iterator<Entity> it = knownEntities.iterator(); it.hasNext(); ) {
      Entity entity = it.next();
View Full Code Here

Examples of org.ethereum.net.p2p.PingMessage

    /* PING_MESSAGE & PONG_MESSAGE */

    @Test /* PingMessage */
    public void testPing() {

        PingMessage pingMessage = new PingMessage();
        System.out.println(pingMessage);

        assertEquals(PongMessage.class, pingMessage.getAnswerMessage());
       
        assertEquals(P2pMessageCodes.PING, pingMessage.getCommand());
    }
View Full Code Here

Examples of org.jboss.aerogear.simplepush.protocol.PingMessage

        new PingMessageImpl("");
    }

    @Test
    public void constructWithBody() {
        final PingMessage ping = new PingMessageImpl("{}");
        assertThat(ping.getMessageType(), is(equalTo(MessageType.Type.PING)));
        assertThat(ping.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
    }
View Full Code Here

Examples of org.jboss.aerogear.simplepush.protocol.PingMessage

    }

    @Test
    public void fromJson() {
        final String json = "{ }";
        final PingMessage ping = JsonUtil.fromJson(json, PingMessageImpl.class);
        assertThat(ping.getMessageType(), is(equalTo(MessageType.Type.PING)));
        assertThat(ping.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
    }
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.