Questions tagged [clientwebsocket]

WebSocket clients are the applications that use the WebSocket API to communicate with WebSocket servers using the WebSocket protocol.

WebSocket clients are the applications that use the WebSocket API to communicate with WebSocket servers using the WebSocket protocol.

41 questions
0
votes
0 answers

Just need to check whether WSS server is On/Off via WSS client using .Net System.Net.WebSockets with Certificate?

Why always getting error Cannot find the requested object? See trace detail in code my comment. I need to implement WSS client and check WSS server availability using certificates. But as try to create object of X509Certificate2, getting…
0
votes
0 answers

Websocket server connection from javascript client gives net::ERR_CONNECTION_REFUSED

My domain :: https://example.com My web socket server code path :: http://live.example.com My php client path:: http://live.example.com/client-php My JS client path :: http://live.example.com/client-web I have my php websocket server running as…
pushE
  • 394
  • 3
  • 16
0
votes
1 answer

WebSocketReceiveResult force to receive binary

I am using Websocket.Client which is a wrapper around ClientWebSocket, within its internals I can see WebSocketReceiveResult and it is using it to detect the message contents result.MessageType == WebSocketMessageType.Text. Is there any way to force…
morleyc
  • 2,169
  • 10
  • 48
  • 108
0
votes
1 answer

ClientWebSocket example hangs

The example shown on the following page doesn't work: Using c# ClientWebSocket with streams It hangs on the following line: await ws.ConnectAsync(serverUri, CancellationToken.None); It appears the connection is not made. Please indicate the…
Tester
  • 117
  • 1
  • 1
  • 9
0
votes
1 answer

ValueError: scheme https is invalid in websocket client to say hello

I get similar problem as this question websockets "scheme https is invalid", but i'm actually trying to use https The problem is that I received an instruction of connecting for getting data from a server and in that document, he gave me the list of…
Huynh
  • 392
  • 5
  • 16
0
votes
0 answers

C# ClientWebSocket retry after connection error

Is there any way to know whether ClientWebSocket connection is closed/disconnected? I am using slack RTM api in C# and sometimes due to connectivity issues connection is closed from server, then I want to retry connection. I am connecting to…
Rushi Soni
  • 1,088
  • 1
  • 13
  • 21
0
votes
0 answers

connecting to websocket api using js and C#

I am trying to connect to websocket api in this address : wss://ws.cex.io/ws/ If i use javascript code, with the WebSocket object, everything is fine. If i use c# code, using ClientWebSocket class, when i try to connect i get "cant access remote…
CUNAIM
  • 11
  • 2
0
votes
0 answers

How to trigger ClientWebSocket close

Basically I want to trigger when I can close this ClientWebSocket when I execute this code static void Main(string[] args) { Thread.Sleep(1000); Connect("ws://endpointfrompublicurl").Wait(); Console.WriteLine("Press any…
poli
  • 67
  • 1
  • 1
  • 7
0
votes
1 answer

Scrape data from WebSocket with C# .Net

I need to scrape data from a websocket "just one time". I mean that I don't need to get continuosly data from the source but I need to get the data one time and exit from the elaboration. I don't need Async task, I just need to use it like a simple…
DarioN1
  • 2,460
  • 7
  • 32
  • 67
-1
votes
1 answer

Best way to mock System.Net.WebSockets ClientWebSocket class to unit test (nunit)

I have used ClientWebSocket class for webSocket communication. What is the best way of mocking the class?
Atulya
  • 153
  • 1
  • 11
-1
votes
1 answer

How to use the data received from ClientWebSocket in C#?

This is a Windows Form Application that streams data from a specific server using ClientWebSocket in C#. I'm new to C# so I just copy/pasted codes from somewhere else on how to connect and receive real time updates from the server. This is the code…
Ely
  • 11
  • 4
1 2
3