Class Thrift::UNIXServerSocket
In: lib/thrift/transport/unix_server_socket.rb
lib/thrift/transport/unix_server_socket.rb
Parent: BaseServerTransport

Methods

accept   accept   close   close   closed?   closed?   listen   listen   new   new  

External Aliases

handle -> to_io
handle -> to_io

Attributes

handle  [RW] 
handle  [RW] 

Public Class methods

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 25
25:     def initialize(path)
26:       @path = path
27:       @handle = nil
28:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 25
25:     def initialize(path)
26:       @path = path
27:       @handle = nil
28:     end

Public Instance methods

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 36
36:     def accept
37:       unless @handle.nil?
38:         sock = @handle.accept
39:         trans = UNIXSocket.new(nil)
40:         trans.handle = sock
41:         trans
42:       end
43:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 36
36:     def accept
37:       unless @handle.nil?
38:         sock = @handle.accept
39:         trans = UNIXSocket.new(nil)
40:         trans.handle = sock
41:         trans
42:       end
43:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 45
45:     def close
46:       if @handle
47:         @handle.close unless @handle.closed?
48:         @handle = nil
49:         # UNIXServer doesn't delete the socket file, so we have to do it ourselves
50:         File.delete(@path)
51:       end
52:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 45
45:     def close
46:       if @handle
47:         @handle.close unless @handle.closed?
48:         @handle = nil
49:         # UNIXServer doesn't delete the socket file, so we have to do it ourselves
50:         File.delete(@path)
51:       end
52:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 54
54:     def closed?
55:       @handle.nil? or @handle.closed?
56:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 54
54:     def closed?
55:       @handle.nil? or @handle.closed?
56:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 32
32:     def listen
33:       @handle = ::UNIXServer.new(@path)
34:     end

[Source]

    # File lib/thrift/transport/unix_server_socket.rb, line 32
32:     def listen
33:       @handle = ::UNIXServer.new(@path)
34:     end

[Validate]