Questions tagged [websocket-sharp]

113 questions
0
votes
0 answers

C# WebSockets-Sharp WebSocketSharpException: "The header of frame cannot be read from the stream"

I have a visual C# application that connects via WebSocket to my remote Node.js server that is deployed using Heroku. The server uses the npm WebSocket module "ws" to create a WebSocket-Server. The C# client application uses the WebSocketSharp…
Phillip Schulze
  • 118
  • 2
  • 8
0
votes
1 answer

websocket-sharp-customheaders send headers

I´ve installed nuget package websocket-sharp-customheaders for my WebSocket application and want to send a sessionId within the http-header-information. Client-Code: public class SocketController { public static readonly string ConnectionString…
Felix Arnold
  • 839
  • 7
  • 35
0
votes
0 answers

Websocket server not getting all messages from client

Using a .net console app, I've created a websocket server. And a separate app for the client end. I've used this webpage to create the server side code (https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_server). So my…
millie
  • 2,642
  • 10
  • 39
  • 58
0
votes
0 answers

How to decode the payload sent on handshake for a Websocket (I'm using Websocket-Sharp)?

I'm using the Websocket-Sharp library to make a client connection to an existing socket service. My client code has this: using (var ws = new WebSocketSharp.WebSocket("wss://localhost")) { ws.OnMessage += (sender, e) =>…
millie
  • 2,642
  • 10
  • 39
  • 58
0
votes
0 answers

How to send data hex or base64 with websocketsharp in C#

How do I connect to WS with library and send data while it is encrypted with base64 or hex? This is data form chromedev-tool image 1: enter image description here image 2 :enter image description here And this is my code (I tried with 3 different…
0
votes
0 answers

Websocket in C#, Any nuget package allows changing nic? (network interface card)

I'm trying to make a C# program which monitors its connection stability to server and switches its network interface card when it seems to be unstable. So, I was wondering if there is any websocket packages which supports switching nic in C#. I am…
0
votes
1 answer

"Expected a JSON header message before receiving binary data" error using WebSocket-Sharp and IBM Watson TTS

I'm trying to use IBM Watson's WebSocket interface so I can obtain the word timings of the audio. Here is a link to the documentation. The authentication part seems to be working fine. But I keep getting the error "Expected a JSON header message…
0
votes
2 answers

Load Scene when websocket receive message

I am using websocket-sharp, and it can connect to my websocket server and can receive message. I try to load scene from onMessage, but it doens't work. Following is onMessage: ws.OnMessage += (sender, e) => { Debug.Log("before load…
Thomas
  • 1,805
  • 1
  • 15
  • 31
0
votes
1 answer

Packing an emoji as plain text unicode string php

I have a website and Unity project that communicate with one another through a web server using web sockets. I am encoding/decoding the messages I am sending using json. On the Unity side, I am using Newtonsoft for json and websocketsharp for…
TEEBQNE
  • 6,104
  • 3
  • 20
  • 37
0
votes
1 answer

Websocket behaviors path, necessary to create a new connection on every url change?

I created a Websocket server based on websocket-sharp, with two behaviors, ex: ws://host/behavior1 ws://host/behavior2 From JavaScript, when I open a connection to the WebSocket Server, I need to specify the URL of the behavior that will accept my…
SlashJ
  • 687
  • 1
  • 11
  • 31
0
votes
1 answer

Websocket server that receives the command and sends it back to all connected clients

I would like to create a websocket server that receives the command and sends it back to all connected clients. Basically, it makes the programs able to communiciate with each other. Can you tell me where to begin?
0
votes
1 answer

WebSocket API for Bitfinex by C# code

I take data from Bittrex without WebSocket by this way request = WebRequest.Create("https://bittrex.com/api/v1.1/public/getticker?market=USDT-BTC"); request.Credentials = CredentialCache.DefaultCredentials; …
FX_Sektor
  • 1,206
  • 2
  • 14
  • 32
0
votes
1 answer

Prevent Response from server to overwrite older responses

Currently I have a working WebSocket-Sharp Client that allows user to send a request on button_click event. I also receive the response from the server in a richtextbox(either NTF or RSP). Private void InstantiateWebSocket() { client=new…
0
votes
1 answer

Receiving back server response towards clients request

Currently I am using WebSocket-Sharp. I am able to connect to the server through my application and I am able to send a Client.Send(Move.HeadNod); to the server on button click. However even though I declared private WebSocket client; const string…
0
votes
2 answers

Connect two devices with websockets

I am new to websockets, please excuse me if the answer to my question is too obvious. I'm using websocket-sharp, as my goal is to build a Unity3D client that connects to a server. (Actually I want to build it for webGL platform, so the client…
Nutjuit
  • 1
  • 3