longpoll | PubSub queuing with long-polling subscribers | Pub Sub library
kandi X-RAY | longpoll Summary
kandi X-RAY | longpoll Summary
Parked: PubSub queuing with long-polling subscribers (not bound to http)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get returns a channel that will receive notifications from the channel
- NewChannel returns a new Channel
- NewTimeout returns a new Pingout connection
- MustNewChannel is like NewChannel but panics on error .
- MustNewTimeout is like NewTimeout but panics if timeout occurs .
- New returns a new long poll .
longpoll Key Features
longpoll Examples and Code Snippets
Community Discussions
Trending Discussions on longpoll
QUESTION
I know there are a lot of questions and answeres regarding this topic out there, but nothing matched my specific issue.
I am using the following versions
- Angular 10.0.14
- @aspnet/signalr 1.0.27
- ASP.NET Core 3.1
VERSION UPDATE:
- I just replaced @aspnet/signalr 1.0.27 by @microsoft/signalr 5.0.11 -> same issue.
The SignalR connection works pretty fine until I add an accessTokenFactory in the Angular frontend.
Frontend
...ANSWER
Answered 2021-Oct-19 at 12:06Browsers do not support headers for websockets, therefore the bearer token has to be added as query string parameter. We hit the maximum length for URLs due to the length of our bearer token. We could shorten our token or use a reference token, see also: https://github.com/aspnet/SignalR/issues/1266
Hope this helps others as well.
QUESTION
I have created a signalr selfhosted webapp service that connects to on prem signalr service using hybrid connection. This self hosted service then broadcast the changes to front end and back to on prem signalR. The self hosted service is fronted by a front door.
Everything works fine locally with long polling (front door doesn't support websockets), but doesn't work when deployed in Azure. Error: Failed to start the transport 'LongPolling': Error: No Connection with that ID: Status code '404'
Anything i am missing?
...ANSWER
Answered 2022-Feb-18 at 13:57QUESTION
Issue: Socket rejoins again and again which causes Live View to emit events itself periodically.
Scenario: I have index page which contains phx-change events. When I left the page idle for sometime, the events started to triggered automatically periodically. It is not limited to single page but it happen on each live view page, I googled the issue but couldn’t find any solution.
1 reason I noticed that sometimes heartbeat stops for more than 1 minute(timeout limit is 1 minute), in this case socket rejoined again.
I increased timeout at client side as well at server side in Endpoint to check if this is the only issue but it didn’t work and socket behaved the same.
Did anyone face same issue before, what could be a possible reasons and how to avoid this issue, any suggestion?
Stack: PETAL
Elixir: 1.11 Erlang: 23.0 phoenix: 1.5.3 phoenix_live_view: 0.15.7 alpinejs “^2.8.2” Browsers: chrome, safari
I think issue is with Alpine Js but couldn’t figure out any solution.
Here is my app.js code
...ANSWER
Answered 2022-Feb-10 at 19:37it was fixed by simple updating Elixir dependencies and npm packages. Here are the steps which I followed:
QUESTION
I'm using middleware in Redux to connect to my signalR hub, which works perfectly and I can receive messages no problem.
Now I have got to the point where I want to invoke a method on the server to "Join a Group".
What is the best way to do so? I have a connection, so recreating the connection on the action "JOIN_GROUP" seems counter intuitive.
I thought I might be onto something when I read xxx, so I could chain
...ANSWER
Answered 2022-Jan-08 at 06:53Managed to work it out. In the end it was a very small tweak, in that the let connection needed to be before the initial (next)
QUESTION
when I use the WebSockets I Can't get the userId on the server
Client code:
...ANSWER
Answered 2021-Dec-07 at 10:25On your server your have to configure the middleware.
This is taken from a working project...
Server :
QUESTION
I use this library tucnak/telebot to build a telegram bot.
Method b.Handle()
have two parameters such as Handle(endpoint interface{}, handler
interface{})`.
Here is the code i use for a starter
...ANSWER
Answered 2021-Sep-26 at 11:15As you can see hello handler takes a parameter called m here.
QUESTION
I use SignalR for my ASP.Net Application with longPolling protocol. I see that the client send the \signalr\pool
request to server with the messageId
form data: d-B1017AFE-SC,B8|bW,0|bs,1|bx,2
.
I'm looking for the documents which describe the d-B1017AFE-SC,B8|bW,0|bs,1|bx,2
format but not yet. Please help me to understand it. Below image was captured from Chrome Dev Toll which explains what I said.
My customer uses Azure WAF to protect the site. The Azure WAF report show that above request belong to the Command Injection
risk because the messageId
contain |bw
,|bs
, |bx
that match the |ps
rule in Azure WAF. So I need to understand the messageId
content to explain for my customer and ask them customize the rule to ignore the request.
Below is the WAF description in the report:
...[{'riskGroup':'','match':'Vector Score: 5, Group Threshold: 4, Triggered Rules: 950006, Mitigated Rules: , Last Matched Message: System Command Injection','threshold':'4','type':'riskscore','version':'1','score':0,'atomics':[{'score':5,'riskGroup':'CMD-INJECTION-ANOMALY','match':'|ps','ruleName':'System Command Injection','selector':'ARGS:messageId','ruleId':'950006','version':'7'}],'actionId':'alert','ruleName':'CMD-INJECTION-ANOMALY','action':'Alert','selector':'','ruleId':'CMD-INJECTION-ANOMALY','category':'Command Injection'}]
ANSWER
Answered 2021-Sep-08 at 15:36This looks right. The messageId
tells the server what was the last message the client received. It looks something like this d-3104A0A8-H,0%7CL,0%7CM,2%7CK,0
and Chrome is translating %7C
to |
.
This document explains the SignalR protocol very well.
Internally, it looks to be based on the deserialized response.
QUESTION
I have been running a NestJS API in a Google Cloud App Engine Service for about 6 months now on the flex environment. I'm testing in one of my lower environments on a service hosted on the standard app engine service environment and noticed today that when I establish a websocket connection from an angular front end, it only works with the longpolling transport. In my flex environment, the websockets transport works fine.
I'm not seeing any errors on my API logging so I'm guessing the standard environment on GCP has some sort of mechanism in place that's preventing the wss traffic to connect on websockets.
It's also possible that my API just isn't logging out exceptions being thrown to the GCP logger for that event.
In the event it is something with the API is there some kind of configuration change I need to make on the API project to allow this? Otherwise, is there something I need to change when deploying to a standard environment in GCP to allow this to work?
TIA
...ANSWER
Answered 2021-Jun-23 at 15:31Websockets are only supported in Flexible (see the section - Comparing high-level features on Google's documentation)
QUESTION
I have 1 server, 1 Asp.Net Core app, nginx, 2 angular apps being hosting on the same Linux Debian server. My use of SignalR is as: 2 apps getting data from same SignalR hubs. I have 2 hubs. 1 is working perfectly for 2 apps, 1 is working perfectly for one app and doesn't work for another one(but they are using from practically the same code). May I ask for some ideas why this error pops up? Thank You for any help.
P.S. everything works perfectly well on local machine.
Configurations: Asp.Net Core: ...ANSWER
Answered 2021-May-06 at 22:33This looks like an issue with the location order in the nginx config file.
The signalr hub connection seems to try to connect to location /
instead of location /api/hubs
, as all requests will be caught by index.html
. Try moving the location /
part below the api
part.
QUESTION
I get regularly following error message while running odoo v14 locally in docker:
...ANSWER
Answered 2021-May-04 at 04:58Those logs are a cryptic way Odoo tells you that you need to configure your proxy correctly.
Odoo normal operations are done through the main (also called HTTP) port, which defaults to 8069. However, long polling requests are a bit different:
- In threaded mode (
workers = 0
, best for development), they pass though the same 8069 port. - In multiprocess mode (
workers = 2
or more, best for production), they use a specific process which listens by default on port 8072.
Your browser knows nothing about how Odoo is configured. It just makes all requests through the same port, whatever it is (tip: HTTP uses 80 by default, and HTTPS uses 443).
That's why, if you are using Odoo in multiprocess mode, there must be an inverse proxy sitting between the web browser and Odoo, directing requests to the right port depending on the path.
Odoo docs give an example nginx configuration and more details. Check them out: https://www.odoo.com/documentation/14.0/setup/deploy.html#id7
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install longpoll
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page