class Thrift::UNIXServerSocket
Attributes
Public Class Methods
Source
# File lib/thrift/transport/unix_server_socket.rb 25 def initialize(path) 26 @path = path 27 @handle = nil 28 end
Public Instance Methods
Source
# File lib/thrift/transport/unix_server_socket.rb 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 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 54 def closed? 55 @handle.nil? or @handle.closed? 56 end
Source
# File lib/thrift/transport/unix_server_socket.rb 32 def listen 33 @handle = ::UNIXServer.new(@path) 34 end
Source
# File lib/thrift/transport/unix_server_socket.rb 60 def to_s 61 "domain(#{@path})" 62 end