-
Notifications
You must be signed in to change notification settings - Fork 87
Allow for serving HTTP over UNIX sockets #115
Conversation
Interestingly, doing it this way ended up removing a bunch of code from SSLServer. It shouldn't be too difficult to merge this PR with my previous one to add verification of client SSL certs. Tests are forthcoming. Wanted to get this out there for comment first. |
@@ -20,17 +20,36 @@ class Server | |||
# @option options [true] spy on the request | |||
# | |||
# @return [Reel::SSLServer] Reel HTTPS server actor | |||
def initialize(host, port, options = {}, &callback) | |||
def self.new(host, port, options = {} , &callback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the approach of overriding ::new
for backwards compatibility. This way, #initialize
can expect to be provided an underlying evented server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this a code comment.
lgtm so far |
Allow for serving HTTP over UNIX sockets
So.. how are you supposed to create a unix Server now? Calling Reel::Server.unix only throws an exception because the super in there can't do anything. |
You're right. I'd been waiting for feedback on the approach before writing tests, but the factory is broken as currently written. |
😢 |
What about changing the API and adding something like URL schemes to setup Servers? |
Would still love it to be able to write down a url like Reel::Server.new('https:///path/to/socket') to start a new Server ^^ |
No description provided.