IiopSetFragmentSize Function

Action

Sets the default fragmentation limit for any object, or specifies a fragmentation limit for a particular object. If the length of an IIOP request/reply message exceeds this limit it is fragmented (broken into parts).

Include file

Iiop.bdh

Syntax

IiopSetFragmentSize( in hIiop : number,
                     in nSize : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
nSize Fragmentation size; if zero, IIOP messages will not be fragmented.

Example

dcltrans
  transaction TFragmentSize
  var
    sBuf  : string(1024);
    nUsed : number;
  begin
    // general settings
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);
    IiopSetFragmentSize(0, 0); // set default: no fragmentation
     
    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2", HOST, PORT, KEY, KEYLEN);
    IiopSetFragmentSize(hIiop, 2048); // set fragment size of hIiop message
    IiopSetBinaryFromFile(hIiop, "very_large_file.dat");
     
    // the IIOP request message resulting from the following IiopRequest call
    // will be split into several messages, each 2048 bytes long.
    IiopRequest(hIiop, "AFragmentedRequest");
    IiopObjectRelease(hIiop);
  end TFragmentSize;