Class: FFI::PCap::ErrorBuffer
- Inherits:
-
Buffer
- Object
- Buffer
- FFI::PCap::ErrorBuffer
- Defined in:
- lib/ffi/pcap/error_buffer.rb
Constant Summary collapse
- SIZE =
Size of the error buffers
256
Instance Method Summary collapse
-
#initialize(ptr = nil) ⇒ ErrorBuffer
constructor
Creates a new ErrorBuffer object.
-
#to_s ⇒ Object
Returns the error message within the error buffer.
Constructor Details
#initialize(ptr = nil) ⇒ ErrorBuffer
Creates a new FFI::PCap::ErrorBuffer object.
14 15 16 17 18 |
# File 'lib/ffi/pcap/error_buffer.rb', line 14 def initialize(ptr=nil) if ptr then super(ptr) else super(SIZE) end end |
Instance Method Details
#to_s ⇒ Object
Returns the error message within the error buffer.
23 24 25 |
# File 'lib/ffi/pcap/error_buffer.rb', line 23 def to_s get_string(0) end |