class Thrift::UNIXSocket

Public Class Methods

new(path, timeout=nil) click to toggle source
   # File lib/thrift/transport/unix_socket.rb
25 def initialize(path, timeout=nil)
26   @path = path
27   @timeout = timeout
28   @desc = @path # for read()'s error
29   @handle = nil
30 end

Public Instance Methods

open() click to toggle source
   # File lib/thrift/transport/unix_socket.rb
32 def open
33   begin
34     @handle = ::UNIXSocket.new(@path)
35   rescue StandardError
36     raise TransportException.new(TransportException::NOT_OPEN, "Could not open UNIX socket at #{@path}")
37   end
38 end
to_s() click to toggle source
   # File lib/thrift/transport/unix_socket.rb
40 def to_s
41   "domain(#{@path})"
42 end