Examples of Packet


Examples of com.caucho.bam.packet.Packet

  {
    synchronized (_startupPacketList) {
      int size = _startupPacketList.size();
     
      for (int i = 0; i < size; i++) {
        Packet packet = _startupPacketList.get(i);
       
        Mailbox mailbox = getMailbox(packet.getTo());
       
        if (mailbox != null) {
          _startupPacketList.remove(i);
         
          return packet;
View Full Code Here

Examples of com.caucho.hemp.packet.Packet

  protected Packet dequeue(WaitQueue.Item item, long timeout)
  {
    item.startPark();

    try {
      Packet packet = _queue.dequeue();

      if (packet == null) {
        if (timeout <= 0)
          return null;

        item.park(timeout);

        packet = _queue.dequeue();
      }

      if (packet != null)
        packet.unparkDequeue();

      return packet;
    } finally {
      item.endPark();
    }
View Full Code Here

Examples of com.corundumstudio.socketio.parser.Packet

        if (log.isTraceEnabled()) {
            log.trace("In message: {} sessionId: {}", content.toString(CharsetUtil.UTF_8), client.getSessionId());
        }
        while (content.isReadable()) {
            try {
                Packet packet = decoder.decodePackets(content, client.getSessionId());
                Namespace ns = namespacesHub.get(packet.getEndpoint());

                NamespaceClient nClient = (NamespaceClient) client.getChildClient(ns);
                packetListener.onPacket(packet, nClient);
            } catch (Exception ex) {
                String c = content.toString(CharsetUtil.UTF_8);
View Full Code Here

Examples of com.corundumstudio.socketio.protocol.Packet

        }
    }

    @Override
    public void sendEvent(String name, Object... data) {
        Packet packet = new Packet(PacketType.MESSAGE);
        packet.setSubType(PacketType.EVENT);
        packet.setName(name);
        packet.setData(Arrays.asList(data));
        send(packet);
    }
View Full Code Here

Examples of com.github.nkzawa.socketio.parser.Packet

    private void onopen() {
        logger.fine("transport is open - connecting");

        if (!"/".equals(this.nsp)) {
            this.packet(new Packet(Parser.CONNECT));
        }
    }
View Full Code Here

Examples of com.google.code.or.net.Packet

    request.setLength(request.getPacketBody().length);
    transport.getOutputStream().writePacket(request);
    transport.getOutputStream().flush();
   
    //
    final Packet response = transport.getInputStream().readPacket();
    if(response.getPacketBody()[0] == ErrorPacket.PACKET_MARKER) {
      final ErrorPacket error = ErrorPacket.valueOf(response);
      LOGGER.info("login failed, user: {}, error: {}", this.user, error);
      throw new TransportException(error);
    } else if(response.getPacketBody()[0] == OKPacket.PACKET_MARKER) {
      final OKPacket ok = OKPacket.valueOf(response);
      LOGGER.info("login successfully, user: {}, detail: {}", this.user, ok);
    } else {
      LOGGER.warn("login failed, unknown packet: ", response);
      throw new NestableRuntimeException("assertion failed, invalid packet: " + response);
View Full Code Here

Examples of com.hazelcast.nio.Packet

        }
        if (nodeEngine.getThisAddress().equals(target)) {
            throw new IllegalArgumentException("Target is this node! -> " + target + ", response: " + response);
        }
        Data data = nodeEngine.toData(response);
        Packet packet = new Packet(data, nodeEngine.getSerializationContext());
        packet.setHeader(Packet.HEADER_OP);
        packet.setHeader(Packet.HEADER_RESPONSE);
        if (response.isUrgent()) {
            packet.setHeader(Packet.HEADER_URGENT);
        }
        return nodeEngine.send(packet, node.getConnectionManager().getOrConnect(target));
    }
View Full Code Here

Examples of com.jcraft.jogg.Packet

     */
    private void init_jorbis() {
        oggSyncState_ = new SyncState();
        oggStreamState_ = new StreamState();
        oggPage_ = new Page();
        oggPacket_ = new Packet();
        vorbisInfo = new Info();
        vorbisComment = new Comment();
        vorbisDspState = new DspState();
        vorbisBlock = new Block(vorbisDspState);
        buffer = null;
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.protocol.Packet

      // try generic decoder next which takes a caps event and tries to match it to an existing packet
      if (body.getType().equals(OSDType.Map))
      {
        OSDMap map = (OSDMap)body;
        Packet packet;
        try {
          packet = Packet.BuildPacket(eventName, map);
        } catch (Exception e) {
          JLogger.warn("Error in building packet for event "
        + eventName + Utils.getExceptionStackTraceAsString(e));
View Full Code Here

Examples of com.olliemcclellan.chatserver.packets.Packet

     * @param o the message (usually an IoBuffer)
     * @throws Exception thrown if an error occurs while receiving a message
     */
    @Override
    public void messageReceived(IoSession is, Object o) throws Exception {
        ChatServer.getInstance().getPacketManager().handle(new Packet((IoBuffer) o));
    }
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.