Questions tagged [websocket-sharp]

113 questions
1
vote
0 answers

Cannot connect trough proxy in C# using websocket

When I try to use proxy in my web socket sharp client it says "An invalid proxy authentication challenge is specified.", even if proxy credentials are correct, if I try to set that proxy as browser proxy it works fine. What could be the problem? My…
TempGuy
  • 11
  • 2
1
vote
1 answer

Websocket client not connecting to websocket server

I have a NET Core 3.1 API in which I create a websocket server and start it when the API runs Program.cs class in API: using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using System; using System.IO; using WebSocketSharp; using…
Tofetopo
  • 456
  • 2
  • 7
  • 20
1
vote
1 answer

Error with handshake server websocketsharp library

09.02.2021 15:26:21|Fatal|WebSocket.connect|WebSocketSharp.WebSocketException: An error has occurred during a TLS handshake. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. --->…
1
vote
0 answers

Azure Web App Service Websockets using Websocket Sharp

I'm using the WebsocketSharp net-standard library to create a websocket server. In my Web App Service, Websockets are ENABLED. Always on is ENABLED. When I run this server locally, I am able to use it with zero issues. As soon as I deploy to Azure…
Carson
  • 864
  • 1
  • 6
  • 19
1
vote
1 answer

Unity - My script stops working on Editor but works on my builds(android, ios)

Installed Unity Version is 2020.2.1f1 I'm developing an online multiplayer game using Unity. I have 2 different connection types; Http and Websocket(using Websocketsharp: https://github.com/sta/websocket-sharp, I've installed it using Nuget). Http…
1
vote
1 answer

I want to implement client-side web socket connection in C#

Javascript code is working for this: function testSocket() { var socket = io("http://localhost:3001/",{ query:{Token:"YWRtaW5Ac3RsdGVjaC5pbjpzdGxAMTIzOjE2MTEzNDE3OTk1OTY="}, }); socket.on('message-processed',(event,callback)=>{ …
1
vote
1 answer

C# WebSocketSharp.WebSocketException: Not a WebSocket handshake response

I'd like to scrape real-time data from a website and i decided to use webSocket - sharp library. My problem is that with the same code i can parse the data from a specific website and i can't from another one. The program throws this exception:…
ggeorge
  • 1,496
  • 2
  • 13
  • 19
1
vote
0 answers

Websocket sharp , reading server variable from onmessage

Hello I am new on web sockets so was wondering what am I doing wrong here, I have a server and client code looks something like this public class SampleSocketService: WebSocketBehavior { private int globalvar = 1; protected override void…
1
vote
2 answers

Create a websocket server olny for .net core console application without using Asp .net core packages

We need to migrate our application to .Net core and we had a dependency with a websocket library build for .Net Framework 3.5 . websocket-sharp Until now i can not found a libray implementation for websocket that use only .Net Core not Asp Net…
1
vote
1 answer

How to make synchronous-like websocket request using websocketsharp?

I'm working on c# project. I'd like to send API request via websocketsharp library in some sort of synchronous way. I've been trying to do it following way: Before we send any WS request , we create new SynchronousRequest() object with unique ID…
Josh
  • 81
  • 1
  • 3
  • 7
1
vote
1 answer

WebSocketSharp with BinanceAPI

I have a connection with binanceApi and I have a disconnect problem, the API disconnects and I don't know the reason, I wanna keep the connection alive until I have the orders in position. I will post my code, maybe someone can help me. I already…
1
vote
1 answer

Unity3D using Secure Websocket for WebGL

I am trying to build a secure websocket from unity headless server to WEBGL client. I know its not natively supported. Ive seen nonsecure examples and I have gotten those to work in local builds. WebGL throws out errors due to using https on…
1
vote
1 answer

How to create a websocket to a URL using "Authorization", "Bearer", token in c#

I need to create a websocket to a particular url(cannot reveal) in c#. Is there something similar to the WebSocket API in Java, or libwebsockets in C for C#? I have already tried using WebSocketSharp and ChilKat by following some of the SO answers. …
1
vote
2 answers

WebSocketSharp - Disabling Console Logging doesn't work

I am using: WebSocketSharp - https://github.com/sta/websocket-sharp And the following code as part of my p2pserver: public void Listen() { var server = new WebSocketServer(P2PPort); server.Log.Output += (d, s) => { }; …
rvnlord
  • 3,487
  • 3
  • 23
  • 32
1
vote
1 answer

How to keep trying connection to websocket even when max retry count for connection has been reached ?

I am currently using a C# application that needs to connect via websocket to a software that has been coded in C++. The C# application is the client, the C++ software the server. I would like the C# application to try reconnecting to the websocket…
Couclou
  • 43
  • 1
  • 8