Allow to specify the protocol (SSL)
See original GitHub issueThe createMatchMakeRequest
method currently only supports requests with the http
protocol, it would be nice to have support for https
.
I think the constructor could be modified to accept an optional second parameter to either explicitly set the protocol for http requests or it could be a flag to indicate that https
is available.
// explicitly set the protocol
enum SupportedProtocols {
HTTP = 'http',
HTTPS = 'https',
}
const client = new Colyseus.Client('ws://my-awesome.game', SupportedProtocols.HTTPS);
// or have a flag to use https
const USE_HTTPS = true;
const client = new Colyseus.Client('ws://my-awesome.game', USE_HTTPS);
As the parameter could be optional/have defaults this could viewed as a backward compatible enhancement.
I don’t do have much game development experience but have been enjoying using this library, thanks for sharing it! I’d be happy to provide a PR for this feature if you have a preference to how you’d like to see this implemented.
Keep up the great work!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Secure Sockets Layer (SSL) protocol - IBM
HTTPS represents a unique protocol that combines SSL and HTTP. Specify https:// as an anchor in HTML documents that link to SSL-protected documents....
Read more >Configuring the SSL Protocol - WebLogic Server
Enable the SSL protocol. For more information, see Enabling the SSL Protocol. Select the Connections-->SSL tab and set the attributes described in Table...
Read more >Enable SSL for all customers - Internet Information Services
Enforce SSL connections · Select the Directory Security tab. In the Secure Communication section, Edit is now available. · Select Require Secure ...
Read more >What is Secure Sockets Layer? - TechTarget
Secure sockets layer (SSL) is a networking protocol designed for securing connections between web clients and web servers over an insecure network, ...
Read more >Enabling HTTPS on your servers - web.dev
Steps covered in this article · Generating keys and certificate signing requests. Generate a public/private key pair · Enable HTTPS on your ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @greaterweb, thanks for the kind words.
If you use
wss://
instead ofws://
it works though 😃I agree that the
Client
could have some options to “toggle” this automatically, as we currently do a hacky thing to perform the http(s) requests here: https://github.com/colyseus/colyseus.js/blob/master/src/Client.ts#L83Oke bác. M cũng cocos creator. Mới đầu cứ tưởng lấy file pem cấu hình ở trên server. Mãi đếch chạy. Thanks bác nha
Vào 23:00 Th 5, 31 thg 12 2020 Tran Cong notifications@github.com đã viết: