Can we use XSockets Server and client on same app?

39 views
Skip to first unread message

Muhammad Usman

unread,
May 7, 2016, 8:16:17 AM5/7/16
to XSockets.NET Developer forum
Hi,

Can we use XSockets Server and client on same app.. Does this project includes serv https://github.com/XSockets/XVA/tree/master/XVA-05-01-WebRTCBasic 
i hosted it on azure app and given public ip of that app in create socket ip:port_number but it gives error 
WebSocket connection to 'wss://40.117.156.123:4502/?ctx=1c743b9b-f19f-4b74-a472-4081dbc14f43' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT


Ulf Björklund

unread,
May 8, 2016, 8:03:58 AM5/8/16
to XSockets.NET Developer forum
Hi

The project you refer to is a simple example on how to use XSockets and WebRTC. In that sample there is no configuration module. This means that the server will autoconfigure... So it will start on localhost by default.
If you want to deploy the sample to Azure or another public server you need to setup a proper configuration. See configuration in the documentation

I would recomend you to host XSockets in a workerole if you are hosting on Azure. See Hosting on Azure in the documentaion
From what I can see you are trying to use wss via an ip-adress, this is not allowed in websockets. You have to use a proper URI that match your certificate. You probably do not have a certificate either, so you will have to start there.

It is very common that people just want to use WebRTC but have no knowledge of websockets in general or XSockets specifically.
I recomend you to read/study websockets, and if you want to use XSockets read the documentation. and you are of course welcome to ask more questions as long as you follow the rules 

Regards, Uffe
Reply all
Reply to author
Forward
0 new messages