private method to cleanup dn
from using the path
component attribute
private method to cleanup attributes
, scope
, filter
and extensions
, from using the query
component attribute
private setter for extensions val
Parses a C prototype signature
If Hash
tymap
is provided, the return value and the arguments from the signature
are expected to be keys, and the value will be the C type to be looked up.
Example:
include Fiddle::CParser #=> Object parse_signature('double sum(double, double)') #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]] parse_signature('void update(void (*cb)(int code))') #=> ["update", Fiddle::TYPE_VOID, [Fiddle::TYPE_VOIDP]] parse_signature('char (*getbuffer(void))[80]') #=> ["getbuffer", Fiddle::TYPE_VOIDP, []]
Given a String of C type ty
, returns the corresponding Fiddle
constant.
ty
can also accept an Array of C type Strings, and will be returned in a corresponding Array.
If Hash
tymap
is provided, ty
is expected to be the key, and the value will be the C type to be looked up.
Example:
include Fiddle::CParser #=> Object parse_ctype('int') #=> Fiddle::TYPE_INT parse_ctype('double diff') #=> Fiddle::TYPE_DOUBLE parse_ctype('unsigned char byte') #=> -Fiddle::TYPE_CHAR parse_ctype('const char* const argv[]') #=> -Fiddle::TYPE_VOIDP
Writes s
in the non-blocking manner.
If there is buffered data, it is flushed first. This may block.
write_nonblock
returns number of bytes written to the SSL
connection.
When no data can be written without blocking it raises OpenSSL::SSL::SSLError
extended by IO::WaitReadable
or IO::WaitWritable
.
IO::WaitReadable
means SSL
needs to read internally so write_nonblock
should be called again after the underlying IO
is readable.
IO::WaitWritable
means SSL
needs to write internally so write_nonblock
should be called again after underlying IO
is writable.
So OpenSSL::Buffering#write_nonblock
needs two rescue clause as follows.
# emulates blocking write. begin result = ssl.write_nonblock(str) rescue IO::WaitReadable IO.select([io]) retry rescue IO::WaitWritable IO.select(nil, [io]) retry end
Note that one reason that write_nonblock
reads from the underlying IO
is when the peer requests a new TLS/SSL handshake. See the openssl FAQ for more details. www.openssl.org/support/faq.html
By specifying ‘exception: false`, the options hash allows you to indicate that write_nonblock
should not raise an IO::Wait*able exception, but return the symbol :wait_writable or :wait_readable instead.
The total time used for garbage collection in seconds
Generates a radio-button Input element.
name
is the name of the input field. value
is the value of the field if checked. checked
specifies whether the field starts off checked.
Alternatively, the attributes can be specified as a hash.
radio_button("name", "value") # <INPUT TYPE="radio" NAME="name" VALUE="value"> radio_button("name", "value", true) # <INPUT TYPE="radio" NAME="name" VALUE="value" CHECKED> radio_button("NAME" => "name", "VALUE" => "value", "ID" => "foo") # <INPUT TYPE="radio" NAME="name" VALUE="value" ID="foo">
Notifies observers of a change in state. See also Observable#notify_observers
Any parameters specified for the content type, returned as a Hash
. For example, a header of Content-Type: text/html; charset=EUC-JP would result in type_params
returning {‘charset’ => ‘EUC-JP’}
Called when a tag is encountered. @p name the tag name @p attrs an array of arrays of attribute/value pairs, suitable for use with assoc or rassoc. IE, <tag attr1=“value1” attr2=“value2”> will result in tag_start
( “tag”, # [[“attr1”,“value1”],])
If response
is an HTTP Success (2XX) response, yields the response if a block was given or shows the response body to the user.
If the response was not successful, shows an error to the user including the error_prefix
and the response body.
Displays a warning statement
to the warning output location. Asks a question
if given.
Enumerates the parents of directory
.
This format specification is a subset of mod_log_config of Apache:
Remote IP address
Total response size
Given variable in ENV
Response filename
Remote host name
Given request header
Remote logname, always “-”
Request method
Given request attribute from req.attributes
Given response header
Server’s request port
The canonical port of the server serving the request or the actual port or the client’s actual port. Valid formats are canonical, local or remote.
Request query string
First line of the request
Request status
Time
the request was received
Time
taken to process the request
Remote user from auth
Unparsed URI
Literal %
Parses an HTTP header raw
into a hash of header fields with an Array of values.