A buffer object—CclBuf is used in the Client application to encapsulate the communication area that is used for passing data to and from a server program. The use of buffer objects is not limited to communication areas; they offer considerable flexibility for general-purpose data marshaling.
CclBuf comma1; comma1 = "Some text"; comma1.insert( 9,"inserted ",5 ) += " at the end"; cout << (char*)comma1.dataArea() << endl; …
Some inserted text at the end
struct rec{ short key; char name[8]; char retval[70]; }; rec record1 = { 1234,"Hilary" }; CclBuf comma2( sizeof(rec),&record1 ); serv2.link( sflow,"QVALUE",&comma2 ); …
The communications area returned from a server is also contained in a buffer object.