Skip to content

Commit

Permalink
Add unix server
Browse files Browse the repository at this point in the history
Based on celluloid#123, which hasn't been
merged yet.
  • Loading branch information
Bruz Marzolf committed Dec 10, 2014
1 parent 0d366d8 commit b85d025
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/reel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
require 'reel/server'
require 'reel/server/http'
require 'reel/server/https'
require 'reel/server/unix'

require 'reel/websocket'
require 'reel/stream'
Expand Down
18 changes: 18 additions & 0 deletions lib/reel/server/unix.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module Reel
class Server
class UNIX < Server

# Create a new Reel HTTPS server
#
# @option options [String] socket path to bind to
# @option options [Fixnum] backlog of requests to accept
#
# @return [Reel::Server::UNIX] Reel UNIX server actor
def initialize(socket_path, options={}, &callback)
server = Celluloid::IO::UNIXServer.new(socket_path)
options[:socket_path] = socket_path
super(server, options, &callback)
end
end
end
end

0 comments on commit b85d025

Please sign in to comment.