Sha256: b57468193432d8d4b212293ea38e9bc59565c1455a55c7a528defeb491fafdcf

Contents?: true

Size: 1.03 KB

Versions: 29

Compression:

Stored size: 1.03 KB

Contents

# -*- encoding: binary -*-
require 'socket'

# See the {README}[link:index.html]
module Kgio

  # The IPv4 address of UNIX domain sockets, useful for creating
  # Rack (and CGI) servers that also serve HTTP traffic over
  # UNIX domain sockets.
  LOCALHOST = '127.0.0.1'

  # Kgio::PipeMethods#kgio_tryread and Kgio::SocketMethods#kgio_tryread will
  # return :wait_readable when waiting for a read is required.
  WaitReadable = :wait_readable

  # PipeMethods#kgio_trywrite and SocketMethods#kgio_trywrite will return
  # :wait_writable when waiting for a read is required.
  WaitWritable = :wait_writable
end

require 'kgio_ext'

# use Kgio::Pipe.popen and Kgio::Pipe.new instead of IO.popen
# and IO.pipe to get PipeMethods#kgio_read and PipeMethod#kgio_write
# methods.
class Kgio::Pipe < IO
  include Kgio::PipeMethods
  class << self

    # call-seq:
    #
    #   rd, wr = Kgio::Pipe.new
    #
    # This creates a new pipe(7) with Kgio::Pipe objects that respond
    # to PipeMethods#kgio_read and PipeMethod#kgio_write
    alias new pipe
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
kgio-2.11.4 lib/kgio.rb
kgio-2.11.3 lib/kgio.rb
kgio-2.11.2 lib/kgio.rb
kgio-2.11.1.1.g36ea lib/kgio.rb
kgio-2.11.1 lib/kgio.rb
kgio-2.11.0 lib/kgio.rb
kgio-2.9.3 lib/kgio.rb
kgio-2.9.2 lib/kgio.rb
kgio-2.9.1 lib/kgio.rb
kgio-2.9.0.2.gf33a lib/kgio.rb
kgio-2.9.0 lib/kgio.rb
kgio-2.8.1 lib/kgio.rb
kgio-2.8.0.2.g30c1 lib/kgio.rb
kgio-2.8.0 lib/kgio.rb
kgio-2.7.4 lib/kgio.rb
kgio-2.7.3 lib/kgio.rb
kgio-2.7.2 lib/kgio.rb
kgio-2.7.1 lib/kgio.rb
kgio-2.7.0.3.gfd1e lib/kgio.rb
kgio-2.7.0 lib/kgio.rb