Is there a way to format the HostName for a StreamSocket to include a user token? I get a "Parameter is Incorrect" exceptions when I try to use a URI with the a user Token. I have had success with a MessageWebSocket but I need a StreamSocket because it is able to (easily) run in the background on Windows 10 UWP. Here is my code. Any help would be greatly appreciated.
public static async void ConnectToStreamSocket()
{
StreamSocket socket = new StreamSocket();
string hostUri = "//example.myexample.com/websocket/dfkjlkdfskldklfdkddkfdkffjf";
HostName host = new HostName(hostUri);
string proto = "wss";
await socket.ConnectAsync(host, proto);
}