Questions tagged as 'websocket'

1
answer

Help with PHP and MongoDB

Hello. I have an application using PHP and MongoDB and wanted to know if there is any way to keep the connection to mongoDB open. I have the following code that connects to the mongo: private static function findNome($nome) : String {...
asked by 23.04.2018 / 19:08
1
answer

How to run a php socket

This script below is a php socket for receiving data from a tk102 vehicle tracker. The problem is that I think it has to be run in a specific folder on the server and I do not know how to do that, and have that CLI script question that I do not...
asked by 08.04.2016 / 16:41
1
answer

Listen to messages with multiple clients (pub / sub)

If I want to have multiple users and channels, do I need to create a client in redis (or whatever pub / sub used) to subscribe to the channel? and how would you get the messages? I'm thinking so, redis-pub / sub clients would need to be at the l...
asked by 24.10.2017 / 05:04
1
answer

Use PHP WebSocket Ratchet online

I'm trying to use Ratchet to create WebSockets in PHP on a site I own. When I ran the tests ( localhost ) everything worked perfectly, but when I try to put it online, it does not run the connection. Reading more on the sub...
asked by 04.07.2016 / 19:17
1
answer

Uploading Websocket file

I need to create a conversation channel for a system, this channel should allow receiving and sending files (docs, xls, png, etc ...), I searched a lot on the internet and did not find many examples, but I found one that I'm trying implement, wh...
asked by 08.08.2016 / 13:28
1
answer

Do not let connected reconnect, PHP

I'm working on a WebSockets server that manages connections but I can not solve this small impasse, not for lack of understanding of the code but for not knowing how to do it. Look, The user connects to the server When another user...
asked by 18.07.2015 / 17:10
1
answer

How to save request data in sessionStorage or Cookies?

I am developing a chat with WebSocket and there is a list of users, when I click on a certain user, a conversation starts with only that user, my doubt is this: clicking the user to start a new conversation is I made a request that returns all m...
asked by 22.04.2015 / 16:18
2
answers

Websocket does not connect to server

I can not connect to the server. Note: the browser supports websocket . I'm doing the following var socket = new WebSocket('sw: localhost:8080'); Any suggestions?     
asked by 20.02.2015 / 16:54
1
answer

WEBSOCKET and PHP data storage

I've come across a doubt, I have a WebSockets server written in PHP and I need to store information that the user sends to the server, and that this data can be retrieved only by the current session between the user and server. I thought of S...
asked by 12.03.2015 / 18:22
1
answer

How to use ping / pong in Java Websocket

I searched for material on the Web but I still have not found how to implement ping / pong messages on the Server and Client, respectively. I know how to send and receive, but I still do not understand the logic of it all. Can anyone help me...
asked by 19.08.2014 / 22:21