Questions tagged [websocket-sharp]
113 questions
1
vote
1 answer
websocket-sharp with pro-presenter stagedisplay
I am trying to use websocket-sharp to interface with a pro-presenter instance as a windows form app. I was able to get a similar project working with JavaScript. My .net version connects to the socket and runs the OnOpen event then immediately runs…

Nickolas Goin
- 11
- 7
1
vote
1 answer
Broker that makes async calls with a synchronous facade in c#
I want to make many calls down a websocket and get a result for each call.
ie
_svc.DoAthing(param) =broker calls=> ws.SendMessage(doathingmessage(ticket))
<=broker returns= ws.Onmessage+=handler=>(doathingresult(ticket))
what…

maxfridbe
- 5,872
- 10
- 58
- 80
1
vote
1 answer
Asp.Net Mvc WebSocket - Custom Arguments for Clients
My WebSocket structure is below.
public HttpResponseMessage Get(int id, string kod)
{
if (HttpContext.Current.IsWebSocketRequest)
{
HttpContext.Current.AcceptWebSocketRequest(new SocketHandler(id, kod));
return…

Barış
- 93
- 8
1
vote
0 answers
Problems with multiple websockets (over time)
TLDR: My websockets stop connecting after a while, though they work perfectly at first. How do I fix it?
I have a C# web service that makes use of two websockets (via websocket-sharp). They are defined like so:
public WebSocketServer sock1=…

senschen
- 794
- 10
- 27
1
vote
1 answer
Parse JSON in websocket sharp
I'm trying to parse JSON string that received from websocket sharp but keep failing.
using (var ws = new WebSocket(WebAddr))
{
ws.Log.Level = LogLevel.Debug;
ws.OnOpen += (ss, ee) =>
{
System.IO.File.WriteAllText(@"C:\log.txt",…

Rocky Wei
- 15
- 1
- 8
1
vote
1 answer
How to connect to NodeJS database from unity?
I created a meteor app that would store user's data for me. Now that it has all the methods I need, I'm ready to use it in Unity. I uploaded the Meteor app to my ngnx server (but first packaged it as nodejs) and it works fine. However, I can't seem…

Leonard Parisi
- 200
- 1
- 3
- 12
1
vote
1 answer
Sockets, Nullreference Exception
I am trying to use web socket with my bot to communicate with the server. But on run time it throws the System.NullReferenceException. I am running socket in background on a different thread so that it does not interfear with the bot.
I am using…

Ehsan Ul Haq
- 209
- 3
- 12
1
vote
1 answer
Autofac with WebSocket-Sharp
we are using websocket-sharp (https://github.com/sta/websocket-sharp). In our WebSocketBehavior we would like to use services that we inject with Autofac. So far we haven't found a way to do that.
How would one use DI with websocket-sharp?

larsbeck
- 665
- 2
- 7
- 11
1
vote
2 answers
websocket-sharp how to work with socketio server and send "emit" request
i can connect to my socketio server, but how can i send a requst with params?
My socketio server listen event
socket.on('init', ( data ) => {
console.log('init', data);
});
on client side i tryed to do this
_socket.OnMessage += (sender, e)…

SLI
- 713
- 11
- 29
1
vote
1 answer
Emitted jsonmessage from Unity to nodejs using Unity-socketio-websocketsharp can not be parsed
I try to send a json message using the emit method from the unitysocketio-websocketsharp library but the received message can not be parsed.
socket.Emit("data", "{\"name\":\"data\",\"args\":[{\"name\":\"testvariable1\",\"value\":\"-63\"}]}");
The…

Shorty123
- 539
- 1
- 7
- 26
1
vote
1 answer
How to host websocket-sharp server on IIS
I have a hostname like dev.websocketserver.com.
Now I want to host my websocket-server on this hostname in IIS, so that my socket address becomes
ws://dev.websocketserver.com/Echo
What should I create WCF service, windows service? Socket will listen…

Shashwat Tripathi
- 572
- 1
- 5
- 19
0
votes
0 answers
Sending data from Django to Unity using Websocket-Sharp
I want to send data via Websocket from my django server to my unity game. The websocket connect and disconnects corectly, but i can't send any data to unity.
In django consumers.py I have this:
class SensorDataConsumer(AsyncWebsocketConsumer):
…
0
votes
0 answers
How to Insert data received from WebSocket in C# without Delay
I want to insert the data in database received from WebSocket but I'm getting a delay while inserting.
I'm using WebSocketSharp() for WebSocket
the data I'm getting in JSON Format.
The hit count of WebS.OnMessage +=(s1,e1)=> method in 550 times in…

Gaurav Mali
- 3
- 3
0
votes
1 answer
Connecting to a webSocket server in c#
I am trying to connect to a webSocket server on port 2998 using the c# package websocket-sharp.
On the client side I am using the following code (written in c#):
WebSocket webSocket = new…

PentaMine
- 31
- 3
0
votes
0 answers
how can I listen to a channel event of a websocket server being a client in c# using the library WebSocketSharp?
I can connect to the server but I can't receive any message from a specific channel and event.
I'm working in c# with the websocket sharp library. Should I change library? The server uses php and laravel
The following code works in java, I need to…

atane
- 1