Languages

Menu
Sites
Language
WebSocket with Ethernet connection proxy

Hallo, I am trying to connect my websocket with ethernet (bluetooth connection with my phone) without success.

When I normaly connect with Wlan enabled the websocket is connecting.

The connection with WebClient and proxy enabled is working fine.

 

Privilege are granted.

  • internet
  • helathinfo
  • power
  • appmanager.launch
  • display
  • network.get
  • network.profile
  • network.set

 

Wearable, Tizen 4.0, C#

My code:

        private ClientWebSocket webSocket;
        private CancellationTokenSource cancellationTokenSource;

        private string webSocketAddress;
        
        private async void ConnectAsync() {
            this.webSocket = new ClientWebSocket();
            this.cancellationTokenSource = new CancellationTokenSource();

            if (ConnectionManager.CurrentConnection.Type == ConnectionType.Ethernet)
            {
                this.webSocket.Options.Proxy = new WebProxy(ConnectionManager.GetProxy(AddressFamily.IPv4), true);
            }

            await this.webSocket.ConnectAsync(new Uri(this.webSocketAddress), this.cancellationTokenSource.Token);
        }
    
Edited by: Nils Gereke on 27 Oct, 2020