How to connect to Appwarp s2 server from Facebook Gameroom app

0 votes
When I run my game locally, my game can connect to the Appwarp s2 hosted at: url:12346 When I move my game to Facebook game room, my game cannot connect to S2 anymore, I guess that is Facebook hosting policy not allowing to connect to port 12346 How do I get around the Facebook issue and able to connect to Appwarp S2 server ? Best Regards.
asked Jul 3, 2017 in AppWarpS2 by manhson (10 points)

1 Answer

0 votes
Hi Manhson,

You need to configure SSL at your AppWarpS2 server to make it work. I believe facebook does not support any without SSL.

Please let me know if you have any further query, I will be happy to help you.

Thanks.
answered Jul 4, 2017 by rajeev.etc (1,660 points)
Do you have steps to setup SSL at AppWarp S2 ?
On the client side, how to initialize and connect to S2 using SSL ?
Hi,
Below are the steps to configure SSL support for AppWarpS2:
1. Generate the jks file for your server.
2. Put the .jks file parallel to AppConfig.json file.
3. Add SSL properties in AppConfig.json file as shown below

   //Name for .jks certificate file
    "JksFileName":"jskfilename.jks",
    "SSLPassPhrase":"Password for jks file"  // Password for the same

You can refer below link for certificate generation for you domain.
https://www.digicert.com/csr-creation-java.htm

Thanks.
Do I need to do anything on the client side (unity webgl) to work with ssl ?
Hi,

Yes, you need to call "enableSSL" API with true as value.

Thanks.
Seems like only WebGL SDK comes with enableSSL method, other SDKs (Android, Windows ...) don't have that API. Is it true ?

Even after setting enableSSL(true), the client still connect to the S2 server via port 12346, not SSL port 12347. Should enableSSL() be called before WarpClient.initialize() ?
Any update on this SSL please ?
Yes, only webGL SDK has the enableSSL method. Regarding your second question, I have forwarded this to my development team and will update you by tomorrow.
Default port is 12346, if you want to  use SSL port 12347, In initialize API need to pass SSL port and before this call enableSSL API.
The initialize API doesn't have port parameter, initialize(public key, private key, hostname). I tried to add port to host name as host:port but then the API doesnt like that format
Can you give an example how to use ?
Are you using AppWarpS2 client or AppWarpCloud client
I use the Unity WebGL client. I dont see a separate SDK for S2
You can download comple AppWarpS2 webGL sample from
https://www.dropbox.com/s/4sp23pz5fdnn3ps/AppWarp_WebGL_S2_Demo.zip?dl=0
In plugin folder you will be find the AppWarpS2WebGL SDK and Websocket.js library.
Let me know in case of more queries are there.
It's working now. Thanks for your help Vishnu.
One more question, if only WebGL SDK has enableSSL api, other SDKs cannot support SSL?
Yes, We have provided this APi in case of JS SDk's only those will running on Browser.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...