class FFI::PCap::ErrorBuffer

Constants

SIZE

Size of the error buffers

Public Class Methods

new(ptr=nil) click to toggle source

Creates a new {ErrorBuffer} object.

@param [FFI::Pointer] ptr

Optional pointer to an existing {ErrorBuffer}.
Calls superclass method
# File lib/ffi/pcap/error_buffer.rb, line 14
def initialize(ptr=nil)
  if ptr then super(ptr)
  else        super(SIZE)
  end
end

Public Instance Methods

to_s() click to toggle source

Returns the error message within the error buffer.

# File lib/ffi/pcap/error_buffer.rb, line 23
def to_s
  get_string(0)
end