class SysVIPC::Shmaddr

Public Class Methods

new(*args) click to toggle source
SWIGINTERN VALUE
_wrap_new_shmaddr(int argc, VALUE *argv, VALUE self) {
  struct shmaddr *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (struct shmaddr *)calloc(1, sizeof(struct shmaddr));
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Public Instance Methods

<<(text, offset = 0)
Alias for: write
read(len, offset = 0) click to toggle source

Read len bytes at offset offset and return them in a String.

    # File lib/SysVIPC.rb
376 def read(len, offset = 0)
377   shmread(self, len, offset)
378 end
write(text, offset = 0) click to toggle source

Write the string text to offset offset.

    # File lib/SysVIPC.rb
369 def write(text, offset = 0)
370   shmwrite(self, text, offset)
371 end
Also aliased as: <<