lib/corosync/cpg.rb
# Connect to the CPG service.
# @return [void]
Connect to the CPG service.
Connect to the CPG service .
def connect
		handle_ptr = FFI::MemoryPointer.new(Corosync.find_type(:cpg_handle_t))
		model_cast = Corosync::CpgModelDataT.new(@model.to_ptr)
		Corosync.cs_send(:cpg_model_initialize, handle_ptr, Corosync::CPG_MODEL_V1, model_cast, nil)
		@handle = handle_ptr.read_uint64
		fd_ptr = FFI::MemoryPointer.new(:int)
		Corosync.cs_send(:cpg_fd_get, @handle, fd_ptr)
		@fd = IO.new(fd_ptr.read_int)
	end
def connect handle_ptr = FFI :: MemoryPointer . new ( Corosync . find_type ( :cpg_handle_t ) ) model_cast = Corosync :: CpgModelDataT . new ( @model . to_ptr ) Corosync . cs_send ( :cpg_model_initialize , handle_ptr , Corosync :: CPG_MODEL_V1 , model_cast , nil ) @handle = handle_ptr . read_uint64 fd_ptr = FFI :: MemoryPointer . new ( :int ) Corosync . cs_send ( :cpg_fd_get , @handle , fd_ptr ) @fd = IO . new ( fd_ptr . read_int ) end
Connect to the CPG service.
Connect to the CPG service .
None
void