Questions tagged [primus]

Primus provides a common low level interface to communicate in real-time using various of real-time frameworks available for Node.js.

Useful Links

40 questions
4
votes
0 answers

Is there a sockJS client for native Android apps?

I'm using Primus with SockJS as my socket server, and I wonder if theres a good native android client (java) for sockjs! Thank you.
SudoPlz
  • 20,996
  • 12
  • 82
  • 123
3
votes
2 answers

How do you prevent a client from sending a huge websocket packet?

I'm making a webapp that uses WebSockets for communication between the browser and node server. If you open up the debug console (F12), you can access the socket instance and write to it. For example, socket.send('packetname', 'data') What's…
Lawrence Douglas
  • 667
  • 1
  • 7
  • 15
2
votes
0 answers

c# implementation of primus websocket

There is a web server (nodeJs) that I want to connect to using c#. The server accepts connections comming from primus websocket (javascript) and I am looking for an implmentation of that for c# but it seems that it doesn't exist. Is anyone here…
Tanuki
  • 72
  • 4
2
votes
1 answer

Primus with Express

I want to use Primus with Express. Primus as abstraction layer to websockets. I used the Primus examples works fine - I used a basic Express examples - works fine. But somehow I can get them working together. index.html (just the standard primus…
Lars
  • 120
  • 2
  • 10
1
vote
1 answer

Primus and async plugins

Version: 8.0.3 Environment: Operating system: macOS Big Sur 11.5.2 Browser: Google Chrome Version 92.0.4515.159 (Official Build) (x86_64) Node.js: 13.14.0 Hi, I'm using Primus with websockets and I'm wondering if it supports async plugins. I…
Matt
  • 308
  • 4
  • 10
1
vote
1 answer

How to use primus in electron

My goal is to make a desktop application with electron. I have already a script in nodejs that works when I run it in Nodejs, but which blocks in electron, and I know that primus is the problem, but I don't know how to solve it. I want to connect in…
Bojack
  • 111
  • 1
  • 1
  • 8
1
vote
0 answers

NodeJs Primus failOver

I have one app that uses primus to connect using websockets. I am in pursuit of making it redundant so the goal is that the client is connected to the websocket on node X and I have node Y on the server as the slave. How can I shutdown node X and…
Diogo Aleixo
  • 841
  • 1
  • 8
  • 20
1
vote
1 answer

Primus + primus-rooms + sockjs: How to retrieve all clients connected to a room

I have a primus server that runs on the sockjs transformer. I'm using the primus-rooms plugin to support rooms. Joining and leaving rooms is successful, I can send messages to clients that are connected to specific rooms. At some point I need to…
Dries Cleymans
  • 770
  • 8
  • 20
1
vote
2 answers

Nodejs application with express-generator, and trying to add primus websocket

we're currently trying to build a nodejs app that works with express-generator. I'm currently trying to add the Primus websocket into my application. The problem is that if I don't add app.listen(port) into my app.js file, my app won't show on…
1
vote
1 answer

How to package feathersjs+primus generated client js?

I am using feathersjs as restful API and primusjs as websocket connection. Below is the code I am using to generate primus.js file: app.configure(primus({ transformer: 'websockets', timeout: false }, (primus) => { primus.library(); …
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
1
vote
1 answer

How to add more parameters on feathersjs service method with primus

I checked this link https://docs.feathersjs.com/real-time/primus.html to setup additional parameters on service method but I didn't figure out how to do it. Below is my service class: create(id, shellId, params) { ... } below is the primus…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
1
vote
1 answer

Primus websocket server failed to read message from client

I use Primus to create a websocket server. And I use wscat command to test that server. It is able to connect to the websocket server. But the server can't receive any messages from the client. Below is the Primus code: http =…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
1
vote
2 answers

Is there a way to share socket connection between browser tabs

Some people already have asked this questions in some other places, Im just not sure if it exists here. Anyways, Im using Primus.io with engine.io as it's transformer. Im wondering if it's possible to have shared websocket connection on the…
mr.b
  • 2,708
  • 8
  • 39
  • 64
1
vote
0 answers

I keep getting a console warning "Ignoring attempt to ingest data in state ready" from share.uncompressed.js file

I am using sharejs with primus for real time editing and any time i am about to use or start editing i get the warning "Ignoring attempt to ingest data in state ready" from the share.uncompressed.js script in my browser. Please does anyone know why…
makinwab
  • 43
  • 5
1
vote
0 answers

Not getting output from websocket-bench when testing Primus

Hopefully this tool isn't too obscure and somebody can help me out, since it would be super useful if I could figure out what I'm doing wrong. I'm running websocket-bench -t primus -p engine.io https://dev.example.org. I see a bunch of…
John
  • 401
  • 6
  • 13
1
2 3