Created
May 28, 2020 09:46
-
-
Save bjoerntx/4194a9e9ab2c075e7adc858072983af1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using TXTextControl.Web.MVC | |
@{ | |
// use an access token (for example returned by OAuth) | |
var sAccessToken = "821e2f35-86e3-4917-a963-b0c4228d1315"; | |
// build WebSocketURL including access token in query string | |
var sProtocol = (Context.Request.IsHttps) ? "wss://" : "ws://"; | |
var sWebSocketURL = sProtocol + Context.Request.Host | |
+ "/TXWebSocket?access_token=" + sAccessToken; | |
} | |
@Html.TXTextControl().TextControl(settings => | |
{ | |
settings.WebSocketURL = sWebSocketURL; // pass built WebSocketURL | |
}).Render() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment