Module: Kernel

Defined in:
lib/xchan.rb

Instance Method Summary collapse

Instance Method Details

#xchan(s) ⇒ Chan::UNIXSocket

Returns an instance of Chan::UNIXSocket

Examples:

ch = xchan
ch.send([1,2,3])
ch.recv.pop # => 3
ch.close

Parameters:

  • s (Symbol, <#dump, #load>)

    The name of a serializer

  • sock_type (Integer)

    Type of socket (eg Socket::SOCK_STREAM)

  • tmpdir (String)

    Directory where temporary files can be stored

Returns:



73
74
75
# File 'lib/xchan.rb', line 73

def xchan(s, ...)
  Chan::UNIXSocket.new(s, ...)
end