Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to specify the protocol (SSL)

See original GitHub issue

Issue Description

The 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://', SupportedProtocols.HTTPS);

// or have a flag to use https
const USE_HTTPS = true;
const client = new Colyseus.Client('ws://', 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:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

endelcommented, May 1, 2020

Hi @greaterweb, thanks for the kind words.

If you use wss:// instead of ws:// 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:

luckybk93commented, Dec 31, 2020

Oke 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 đã viết:

@luckybk93 Không biết bạn dùng client là gì bạn. Client mình là cocos creator. Trong example của nó có file cacert.pem luôn bạn ah. http://url

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe .

Read more comments on GitHub >

github_iconTop 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 -
Steps covered in this article · Generating keys and certificate signing requests. Generate a public/private key pair · Enable HTTPS on your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found