Class: GAVerify::Server

Inherits:
Handler show all
Defined in:
lib/ga_verify/server.rb

Instance Method Summary collapse

Methods inherited from Handler

#check_user

Constructor Details

#initialize(socket_path) ⇒ Server

Returns a new instance of Server.



7
8
9
10
11
12
13
# File 'lib/ga_verify/server.rb', line 7

def initialize socket_path
  handler   = GAVerify::Handler.new
  processor = GAVerify::Verifier::Processor.new handler
  transport = Thrift::FramedTransportFactory.new
  socket    = Thrift::UNIXServerSocket.new(socket_path)
  @server   = Thrift::NonblockingServer.new processor, socket, transport
end

Instance Method Details

#serve!Object



15
16
17
# File 'lib/ga_verify/server.rb', line 15

def serve!
  @server.serve
end