Package net.hasor.rsf.protocol.block

Examples of net.hasor.rsf.protocol.block.ResponseSocketBlock.addOption()


        //* byte[1]  optionCount                          选项参数总数
        byte optionCount = buf.readByte();
        for (int i = 0; i < optionCount; i++) {
            //* byte[4]  attr-0-(attr-index,attr-index)   选项参数
            int mergeData = buf.readInt();
            res.addOption(mergeData);
        }
        //* --------------------------------------------------------bytes =6 ~ 8192
        //* byte[2]  attrPool-size (Max = 2047)           池大小
        short attrPoolSize = buf.readShort();
        for (int i = 0; i < attrPoolSize; i++) {
View Full Code Here


        socketMsg.setReturnType(pushString(socketMsg, msg.getReturnType()));//返回类型
        socketMsg.setReturnData(socketMsg.pushData(msg.getReturnData()));//返回值
        //2.Opt参数
        String[] optKeys = msg.getOptionKeys();
        for (int i = 0; i < optKeys.length; i++) {
            socketMsg.addOption(//
                    pushString(socketMsg, optKeys[i]), pushString(socketMsg, msg.getOption(optKeys[i])));
        }
        return socketMsg;
    };
    private static short pushString(BaseSocketBlock socketMessage, String attrData) {
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.