Class: CZMQ::FFI::Zframe

Inherits:
Object
  • Object
show all
Defined in:
lib/cztop/ffi.rb

Overview


Zframe (lightweight — only used for borrowed frames from Zmsg)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._from_ptr(ptr, _owned = false) ⇒ Object

Wraps a borrowed zframe_t pointer (not owned, no finalizer).



469
470
471
472
473
# File 'lib/cztop/ffi.rb', line 469

def self._from_ptr(ptr, _owned = false)
  obj = allocate
  obj.instance_variable_set(:@ptr, ptr)
  obj
end

Instance Method Details

#dataObject



475
476
477
# File 'lib/cztop/ffi.rb', line 475

def data
  CZMQ::FFI.zframe_data(@ptr)
end

#sizeObject



479
480
481
# File 'lib/cztop/ffi.rb', line 479

def size
  CZMQ::FFI.zframe_size(@ptr)
end