Sha256: f6d03fa76d4a020b49e5fe22d1b043b565760f23ed601a06ca34a360839ff85c

Contents?: true

Size: 494 Bytes

Versions: 3

Compression:

Stored size: 494 Bytes

Contents

require 'ldap/server'
require 'rbmk/operation'
module RBMK
class Worker

	def self.hire client, upstream; new(client, upstream).serve end

	def initialize client, upstream
		upstream.mktemp
		@socket = client
		@conn = LDAP::Server::Connection.new @socket,
			server: upstream,
			logger: $log,
			operation_class: RBMK::Operation,
			schema: upstream.schema,
			namingContexts: upstream.root_dse['namingContexts']
	end

	def serve
		@conn.handle_requests
	ensure
		@socket.close
	end

end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rbmk-0.1.0.c lib/rbmk/worker.rb
rbmk-0.1.0.b lib/rbmk/worker.rb
rbmk-0.1.0.a lib/rbmk/worker.rb