Changeset 765

Show
Ignore:
Timestamp:
03/25/08 08:25:18 (20 months ago)
Author:
dormando
Message:

More perl binary protocol tests passing now. Still a lot broken.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/binary/server/t/binary.t

    r764 r765  
    2525use constant CMD_CAS     => 51; 
    2626 
    27 # Flags, expiration 
    28 use constant SET_PKT_FMT => "NN"; 
     27# CAS, Flags, expiration 
     28use constant SET_PKT_FMT => "NNNN"; 
    2929 
    3030# Flags, expiration, id 
     
    4040use constant RES_MAGIC_BYTE => 0x80; 
    4141 
    42 use constant PKT_FMT => "CCSCxxxNN"; 
     42use constant PKT_FMT => "CCnCxxxNN"; 
    4343 
    4444#min recv packet size 
     
    330330        my $self = shift; 
    331331        my $rv = shift; # currently contains 4 bytes of 'flag' followed by value 
     332    my $cas  = substr $rv, 0, 8, ''; # $cas contains CAS value, $rv has f, v. 
    332333        my $flag = substr $rv, 0, 4, ''; # Now $flag contains flags, $rv contains value 
    333334        return unpack("N", $flag), $rv; 
     
    345346        my ($cmd, $key, $exp, $flags, $val) = @_; 
    346347 
    347         return $self->_doCmd($cmd, $key, $val, pack(::SET_PKT_FMT, $flags, $exp)); 
     348        return $self->_doCmd($cmd, $key, $val, pack(::SET_PKT_FMT, 0, 0, $flags, $exp)); 
    348349} 
    349350