class HttpParser::Instance

def initialize(ptr = nil)

def initialize(ptr = nil)
    if ptr then super(ptr)
    else
        super()
        self.type = :both
    end
    yield self if block_given?
    ::HttpParser.http_parser_init(self, self.type) unless ptr
end