Comments (2)
Ah interesting. Your question caused me to look at the the API I created
for mounting a server again - websocketServer.mount(config) - and I
realized that the design of the API doesn't lend itself well to being able
to mount the websocket instance to multiple http servers. I hadn't really
considered that people might want to do that when I designed it, but it's
certainly a legitimate use case that really ought to be accommodated.
I'll think more on this and how it can be supported without breaking
existing API compatibility.
Brian
On Tue, Jan 8, 2013 at 12:25 AM, James Jenner [email protected]:
Hi,
This is only a minor issue and in all honesty can be fixed either via doco
or not at all.Just that I tried recently to implement ssl and presumed that there would
be an option for httpsServer, as there is currently an option for
httpServer. Turns out there isn't and must use httpServer.If you do not specify httpServer then WebSocketServer throws the exception
"You must specify an httpServer on which to mount the WebSocket server."It just threw me for a little bit until I figured out that I just set
httpServer to the https server that I created.As I said, it's not a biggie, just a tad confusing is all.
I'm actually curious if it would make sense to be able to specify both a
httpServer and httpsServer for the same websocket, would that make sense?
Right now I'm creating two instances and setting one to the http server and
one to the https server.Cheers,
James.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/75.
Brian McKelvey
C.E.O & Co-Founder
Worlize Inc.
www.worlize.com
from websocket-node.
Just pushed a commit that allows you to optionally pass an array of http/https server instances as the value of the httpServer property. There can be as many instances as you like, and they can be a mixture of http or https servers.
from websocket-node.
Related Issues (20)
- The NPM package is not a place for politics HOT 1
- The NPM package is not a place for politics HOT 2
- Get URL Parameters HOT 1
- Ssl using cloudflare
- Send bytes query
- broadcast
- How to connect to multiple WebSockets? HOT 1
- install of websocket and immediatly disapear
- How Can we get Connection URL from w3cwebsocket to webSocket.Server Connection
- Similar to emit socket.io HOT 1
- send to all connected clients HOT 2
- Getting vulnerable issue [email protected]
- Need more docs on the usage of client
- Unable to connect with auth info in url and special characters HOT 1
- connection.on('message', ...) - where this event is emitted ? HOT 1
- This pkg appears abandoned. I recommend switching to "ws", it's a very similar implementation HOT 4
- Malware dependency
- Update UTF-8 Validation Code
- Request to Upgrade es5-ext Dependency to Resolve Veracode Vulnerability HOT 5
- websocket doesn't work under bun HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocket-node.