// ExtractCmdAndKeyAndValue extract key and value for dispatch backend server
ExtractCmdAndKeyAndValue extract key and value for dispatch backend server
// ExtractCmdAndKeyAndValue extract key and value for dispatch backend server
func ExtactCmdAndKeyAndValue(frame []byte) (cmd, key, value []byte, err error) {
	reader := NewReader(bytes.NewReader(frame))
	reader.readLine()
	reader.readLine()
	cmd, err = reader.readLine()
	if err != nil {
		return nil, nil, nil, err
	}
	cmd = cmd[:len(key)-2]
	reader.readLine()
	key, err = reader.readLine()
	if err != nil {
		return nil, nil, nil, err
	}
	key = key[:len(key)-2]
	reader.readLine()
	value, err = reader.readLine()
	if err != nil {
		return nil, nil, nil, err
	}
	value = value[:len(value)-2]
	return
}
func ExtactCmdAndKeyAndValue ( frame [ ] byte ) ( cmd , key , value [ ] byte , err error ) { reader := NewReader ( bytes . NewReader ( frame ) ) reader . readLine ( ) reader . readLine ( ) cmd , err = reader . readLine ( ) if err != nil { return nil , nil , nil , err } cmd = cmd [ : len ( key ) - 2 ] reader . readLine ( ) key , err = reader . readLine ( ) if err != nil { return nil , nil , nil , err } key = key [ : len ( key ) - 2 ] reader . readLine ( ) value , err = reader . readLine ( ) if err != nil { return nil , nil , nil , err } value = value [ : len ( value ) - 2 ] return }
ExtractCmdAndKeyAndValue extract key and value for dispatch backend server
ExtractCmdAndKeyAndValue extract key and value for dispatch backend server
// skip request message length // skip key command length // take command // skip key  length // skip value length // take value