Package net.hasor.rsf.protocol.block

Examples of net.hasor.rsf.protocol.block.RequestSocketBlock.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();
            req.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.addParameter(pushString(socketMsg, pType), socketMsg.pushData(pData));
        }
        //3.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;
    };
    /**将{@link ResponseMsg}转换为{@link ResponseSocketBlock}消息。*/
 
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.