Websocket or Server-sent events? - websocket

If I need to show text being written on one browser card on another browser card, What is better? Websocket or Server-sent events?

Related

How many websocket subscribtions should i have in a messenger app?

I develop a backend part of a messenger thing of some project. And i'm wondering what whould be the best way to provide websocket stomp subscriptions to frontend.
Pseudo event list:
message delivered
message edited
chat created
user typing
etc.
should it be like:
users/id/messages/created
users/id/messages/edited
users/id/chats/created
(One subscription per event)
or:
users/id/messenger/events
and json message with EvenType to define an event

Interface / service to easily respond to text messages

I am curious if there is a simple interface or service I can subscribe to that would allow me to respond to incoming SMS pretty easily? Right now I am just using a simple TwiML script to forward to another number. But I can't respond and I'm getting 3 to 5 spam texts a week that I would love to respond STOP to, but I don't have an easy interface to do that with. Any suggestions?

How to receive a pulse in Javascript Sinch SDK call to PSTN

I can see in the JS reference how to send a dial tone, but how can I process an incoming one in the JS SDK?
In other words, I need the call receiver to be able to press a number in their phone to acknowledge something and trigger an action in JS
DTMF is not for the other end JS client to recieve, its for the rest api to react on, think IVR etc
See #Redaniums (https://stackoverflow.com/users/3339316/redanium) comment above https://www.sinch.com/docs/voice/rest/#PIE

Symfony3.4 - Send a Server-Sent Event when something happens

I'm developing a project with Symfony 3.4.
I would like to send a message to all the clients currently viewing a page when something happens. I evaluated both Server-Sent Events and Websockets, and I decided to go with the former, because the communication is unidirectional (only server to client).
For this purpose, I'm using this library: https://packagist.org/packages/tonyhhyip/sse
It seems to work, but I need to specifically send a message when something happens in the whole system. I tried with the Symfony event system (by creating a custom event), but events seem to be dispatched and captured only within the same session (i.e., the same logged user). In other words, if an action performed by a user triggers an event, it is not captured by other users and therefore a message is not sent to the browser via SSE.
Any suggestion?
Thank you

How to implement scrolling on the receiver page using iframe

I have a receiver page which receives an url an it is used in an iframe.
I want from my android app have controls to make scrolling on that iframe, is it posible?
I am able to send messages from my android app to the receiver page without problem, but can't make scrolling.
I received the message,
"Blocked a frame with origin "receiver url" from accessing a frame with origin "iframe url". Protocols, domains, and ports must match."
I know this is related with same origin policy, but how chromecast extension for chrome works? because I see it works well there.
The Chromecast extension generates a video stream of the content in the Chrome tab. The scrolling is happening in the sender not the receiver.
Also, doing scrolling on the receiver would likely be a bad user experience for the Chromecast device. That kind of interaction is best suited for the sender device. The ChromeCast UI is best suited for fullscreen experiences that don't require scrolling.

Resources