Sha256: ae8de6aada7b84520d24fe1700b763a634ad17cbcb0319931c0d4f9518c839cf

Contents?: true

Size: 1008 Bytes

Versions: 2

Compression:

Stored size: 1008 Bytes

Contents

# -*- encoding: binary -*-
require 'socket'
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'
end

# Kgio::PipeMethods#kgio_tryread and Kgio::SocketMethods#kgio_tryread will
# return this constant when waiting for a read is required.
module Kgio::WaitReadable; end

# PipeMethods#kgio_trywrite and SocketMethods#kgio_trywrite will
# return this constant when waiting for a read is required.
module Kgio::WaitWritable; 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

2 entries across 2 versions & 1 rubygems

Version Path
kgio-1.2.1 lib/kgio.rb
kgio-1.2.0 lib/kgio.rb