Examples of NetMessage


Examples of com.yz.net.NetMessage


        byte[] echodata = new byte[len];
        data.get(echodata);

        NetMessage message = null;
        try {
          message = new EchoMessage(new String(echodata, "UTF-8"));
          if(list == null) {
            list = new ArrayList<NetMessage>();
          }
View Full Code Here

Examples of com.yz.net.NetMessage

       
       
        byte[] echodata = new byte[len];
        data.get(echodata);
       
        NetMessage message = null;
        try {
          message = new EchoMessage(new String(echodata, "UTF-8"));
          if(list == null) {
            list = new ArrayList<NetMessage>();
          }
View Full Code Here

Examples of com.yz.net.NetMessage

          inBuffer.compact();                  //压缩,把剩余的字节放到inBuffer的最前面
          inBuffer.limit(inBuffer.capacity());

          //处理消息
          for(int i=0; i<size; i++) {
            NetMessage msg = list.get(i);
            if(msg.equals(NetMessage.ERROR_MSG)) {  //协议解析发生不可恢复错误
              this.close();     //发出关闭请求
              return;      //发生错误后,不能下文处理了.
            }
            else {
              this.ownerAcceptor.getConfigure().getIoHandler().messageReceived(this, msg);
View Full Code Here

Examples of org.terasology.protobuf.NetData.NetMessage

        }
    }

    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
        NetMessage message = (NetMessage) e.getMessage();
        server.queueMessage(message);
    }
View Full Code Here

Examples of org.terasology.protobuf.NetData.NetMessage

        }
    }

    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
        NetMessage message = (NetMessage) e.getMessage();
        client.messageReceived(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.