Method: PKCS11::Library#C_WaitForSlotEvent

Defined in:
lib/pkcs11/library.rb

#C_WaitForSlotEvent(flags = 0) ⇒ Slot? Also known as: wait_for_slot_event

Waits for a slot event, such as token insertion or token removal, to occur.

Parameters:

  • flags (Integer) (defaults to: 0)

    determines whether or not the C_WaitForSlotEvent call blocks (i.e., waits for a slot event to occur); At present, the only flag defined for use in the flags argument is PKCS11::CKF_DONT_BLOCK

Returns:

  • (Slot, nil)

    the slot that the event occurred in; nil if no event occured (CKR_NO_EVENT)



104
105
106
107
# File 'lib/pkcs11/library.rb', line 104

def C_WaitForSlotEvent(flags=0)
  slot = unwrapped_C_WaitForSlotEvent(flags)
  slot ? Slot.new(self, slot) : nil
end