Unexpected "/socketpeer/" default path
Took me a bit to figure out why my websockets were all pending but not rejecting. The client (I'm using it independently and not as part of the built-in demo) has the default path http://localhost, but the server expects a default path ending in /socketpeer/, even when I pass in the httpServer or host options.
Would you be open to one of these?
- Change default path to
/socketpeer/in client. - Make default path for server
/if it's not running in demo mode. - Provide option to override server path.
Thanks!
@donmccurdy I like these suggestions- do you have a preference of which of these best matches your expectations?
@potch thanks, an option to override the path in the server here would probably be my preference.
Reconsidering, I don't think (1) alone is a good choice because the user will often need to provide the url parameter to specify their host, losing any default path. It would be OK if the client had separate host and path parameters, maybe, so that the host could be overridden and the default path would be more explicit.