Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  PROTOCOL::CASSANDRACQL::FRAME (3)

.ds Aq ’


"Protocol::CassandraCQL::Frame" - a byte buffer storing the content of a CQL message frame



This class provides wire-protocol encoding and decoding support for constructing and parsing Cassandra CQL message frames. An object represents a buffer during construction or parsing.

To construct a message frame, create a new empty object and use the pack_* methods to append data to it, before eventually obtaining the actual frame bytes using bytes. Each pack_* method returns the frame object, allowing them to be easily chained:

 my $bytes = Protocol::CassandraCQL::Frame->new
    ->pack_short( 123 )
    ->pack_int( 45678 )
    ->pack_string( "here is the data" )

To parse a message frame, create a new object from the bytes in the message, and use the unpack_* methods to consume the values from it.

 my $frame = Protocol::CassandraCQL::Frame->new( $bytes );
 my $s   = $frame->unpack_short;
 my $i   = $frame->unpack_int;
 my $str = $frame->unpack_string;


CW$frame = Protocol::CassandraCQL::Frame->new( CW$bytes )

Returns a new frame buffer, optionally initialised with the given byte string.


CW$bytes = CW$frame->bytes

Returns the byte string currently in the buffer.

CW$frame->pack_byte( CW$v )

CW$v = CW$frame->unpack_byte

Add or remove a byte value.

CW$frame->pack_short( CW$v )

CW$v = CW$frame->unpack_short

Add or remove a short value.

CW$frame->pack_int( CW$v )

CW$v = CW$frame->unpack_int

Add or remove an int value.

CW$frame->pack_string( CW$v )

CW$v = CW$frame->unpack_string

Add or remove a string value.

CW$frame->pack_lstring( CW$v )

CW$v = CW$frame->unpack_lstring

Add or remove a long string value.

CW$frame->pack_uuid( CW$v )

CW$v = CW$frame->unpack_uuid

Add or remove a UUID as a plain 16-byte raw scalar

CW$frame->pack_string_list( CW$v )

CW$v = CW$frame->unpack_string_list

Add or remove a list of strings from or to an ARRAYref

CW$frame->pack_bytes( CW$v )

CW$v = CW$frame->unpack_bytes

Add or remove opaque bytes or undef.

CW$frame->pack_short_bytes( CW$v )

CW$v = CW$frame->unpack_short_bytes

Add or remove opaque short bytes.

CW$frame->pack_inet( CW$v )

CW$v = CW$frame->unpack_inet

Add or remove an IPv4 or IPv6 address from or to a packed sockaddr string (such as returned from pack_sockaddr_in or pack_sockaddr_in6.

CW$frame->pack_string_map( CW$v )

CW$v = CW$frame->unpack_string_map

Add or remove a string map from or to a HASH of strings.

CW$frame->pack_string_multimap( CW$v )

CW$v = CW$frame->unpack_string_multimap

Add or remove a string multimap from or to a HASH of ARRAYs of strings.


This code was paid for by
o Perceptyx <>
o Shadowcat Systems <>


Paul Evans <>
Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 PROTOCOL::CASSANDRACQL::FRAME (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.