pike.git / lib / modules / SSL.pmod / Buffer.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Buffer.pike:54:   //! Reads an array of integers as written by @[add_int_array]   //! from the buffer.   array(int) read_int_array(int item_size, int len)   {    int size = read_int(len);    int elems = size/item_size;    if( elems*item_size != size )    throw(.BufferError("Impossible uint array length value.\n"));    return read_ints(elems, item_size);   } +  + //! Reads an array of strings as written by @[add_string_array] + //! from the buffer. + array(string(8bit)) read_string_array(int(0..) item_size, int(0..) len) + { +  Stdio.Buffer sub = read_hbuffer(len); +  array(string(8bit)) res = ({}); +  while (sizeof(sub)) { +  res += ({ sub->read_hstring(item_size) }); +  } +  return res; + }