Results for: "minmax"

returns the socket family as an integer.

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").family
#=> 10

Creates a new Socket::AncillaryData object which contains a int as data.

The size and endian is dependent on the host.

require 'socket'

p Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno)
#=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 2>

Returns the data in ancillarydata as an int.

The size and endian is dependent on the host.

ancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno)
p ancdata.int #=> 2

Returns a string to show contents of ifaddr.

Returns the interface index of ifaddr.

Returns the netmask address of ifaddr. nil is returned if netmask is not available in ifaddr.

returns the socket family as an integer.

p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family
#=> 10

Returns a string which shows sockopt in human-readable form.

p Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")).inspect
#=> "#<Socket::Option: INET SOCKET KEEPALIVE 1>"

Creates a new Socket::Option object which contains an int as data.

The size and endian is dependent on the platform.

p Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1)
#=> #<Socket::Option: INET SOCKET KEEPALIVE 1>

Returns the data in sockopt as an int.

The size and endian is dependent on the platform.

sockopt = Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1)
p sockopt.int => 1

Creates a new Socket::Option object for SOL_SOCKET/SO_LINGER.

onoff should be an integer or a boolean.

secs should be the number of seconds.

p Socket::Option.linger(true, 10)
#=> #<Socket::Option: UNSPEC SOCKET LINGER on 10sec>

Returns the linger data in sockopt as a pair of boolean and integer.

sockopt = Socket::Option.linger(true, 10)
p sockopt.linger => [true, 10]

Logs a message at the info (syslog info) log level, or logs the message returned from the block.

No documentation available

Returns key information as Array of: :num_keys

The number of subkeys.

:max_key_length

Maximum length of name of subkeys.

:num_values

The number of values.

:max_value_name_length

Maximum length of name of values.

:max_value_length

Maximum length of value of values.

:descriptor_length

Length of security descriptor.

:wtime

Last write time as FILETIME(64-bit integer)

For detail, see RegQueryInfoKey Win32 API.

Returns true if the stream is finished.

Finishes the stream and flushes output buffer. If a block is given each chunk is yielded to the block until the input buffer has been flushed to the output buffer.

Decompresses string. Raises a Zlib::NeedDict exception if a preset dictionary is needed for decompression.

This method is almost equivalent to the following code:

def inflate(string)
  zstream = Zlib::Inflate.new
  buf = zstream.inflate(string)
  zstream.finish
  zstream.close
  buf
end

See also Zlib.deflate

Inputs deflate_string into the inflate stream and returns the output from the stream. Calling this method, both the input and the output buffer of the stream are flushed. If string is nil, this method finishes the stream, just like Zlib::ZStream#finish.

If a block is given consecutive inflated chunks from the deflate_string are yielded to the block and nil is returned.

If a :buffer keyword argument is given and not nil:

Raises a Zlib::NeedDict exception if a preset dictionary is needed to decompress. Set the dictionary by Zlib::Inflate#set_dictionary and then call this method again with an empty string to flush the stream:

inflater = Zlib::Inflate.new

begin
  out = inflater.inflate compressed
rescue Zlib::NeedDict
  # ensure the dictionary matches the stream's required dictionary
  raise unless inflater.adler == Zlib.adler32(dictionary)

  inflater.set_dictionary dictionary
  inflater.inflate ''
end

# ...

inflater.close

See also Zlib::Inflate.new

Closes the GzipFile object. Unlike Zlib::GzipFile#close, this method never calls the close method of the associated IO object. Returns the associated IO object.

Same as IO.

Same as IO.

The line number of the last row read from this file.

Specify line number of the last row read from this file.

Resets the position of the file pointer to the point created the GzipReader object. The associated IO object needs to respond to the seek method.

Search took: 3ms  ·  Total Results: 1703