Rename connection to listener or similar
Instead of server.connection() can we rename it to server.listener() or server.connectionListener()? Since its not creating a real connection to anything and is more about setting up a listener I think its more specific to rename it.
Perhaps a method name prefixed by define would be appropriate to avoid misleading users into thinking that calling server.connection() will actually result in their server actively listening.
Perhaps a note should be added at the bottom of the server.connection() docs section clarifying the two-phase approach for defining then starting connections / listeners.
Since server.connection() has a property listener (http://hapijs.com/api#serverconnectionoptions) it would be weird to call it listener()
Does each server.connection represent an http server? They all have their own routing table and request lifecycle. If so I'm not sure that either is the appropriate name.
yeah.. this is an awkward one.. i feel like @hueniverse had mentioned using realm as terminology somewhere, maybe that's appropriate here?
Just throwing a new term out there for brainstorming: responder.
On Fri Nov 21 2014 at 3:54:23 PM Nathan LaFreniere [email protected] wrote:
yeah.. this is an awkward one.. i feel like @hueniverse https://github.com/hueniverse had mentioned using realm as terminology somewhere, maybe that's appropriate here?
— Reply to this email directly or view it on GitHub https://github.com/hapijs/hapi/issues/2192#issuecomment-64036018.
@geek made a good comment a bit ago, what about origin, speaking specifically of: http://tools.ietf.org/html/rfc6454
tl; dr: "Roughly speaking, two URIs are part of the same origin (i.e., represent the same principal) if they have the same scheme, host, and port." -@geek
that's not bad at all, i like origin and bonus points for having a fitting definition
server.origin()
server.origins
That's all @geek - the TLDR is a direct quote from him.
The quote was totally @geek's (edit to add quotations)
@nvcexploder that was lifted from the rfc: http://tools.ietf.org/html/rfc6454#section-3.2
SHSHSHHHHHHHhhhhhhh.
I don't like origin. It's weird.
Connections make sense to me. I am going to stick with it for now. If someone comes up with a better name, we can add it as alias and keep it compatible.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.