ratchet

ratchetphp/Pawl Connection closed (1009 - ) FRAME::CLOSE_TOO_BIG = 1009

倖福魔咒の 提交于 2019-12-11 15:29:47
问题 I'm excited to be using Pawl, and I have it working for small files (such as 350 KB). However, when I send a larger file (say, 30 MB) via $fullFileName as shown below, I get this error: Connection closed (1009 - ) . \Ratchet\Client\connect($url)->then(function(\Ratchet\Client\WebSocket $conn) use($contentType, $fullFileName) { $conn->on('message', function($msg) use ($conn) { Log::debug("Received: {$msg}"); }); $conn->on('close', function($code = null, $reason = null) { Log::debug("Connection

Ratchet server instantiation: “Unsupported declare 'strict_types'”

一曲冷凌霜 提交于 2019-12-11 13:05:14
问题 I have a Ratchet application running smoothly in my windows local machine with PHP version: 7.1.8 . I tried to install zmq and php binding on linux deployment server with PHP version 5.5.9 and zmq installed version : 4.0.4 . Here's the error I get when I try to instantiate server script on server: org@ktm /var/www/html/project_dir (pusher)$ php index.php "/report-test" PHP Warning: Unsupported declare 'strict_types' in /var/www/html/Test_Gbd_Portal/gbdportal-new/vendor/evenement/evenement/src

Browser client using autobahn.js can not connect to Ratchet Websocket Server

自古美人都是妖i 提交于 2019-12-11 10:33:28
问题 I'm struggling with a problem : I developed a Ratchet Web Socket Server using PHP Ratchet socketo.me My server is up and listening to port 8082 : require 'vendor/autoload.php'; $loop = React\EventLoop\Factory::create(); $pusher = new MyApp\Pusher; // Listen for the web server to make a ZeroMQ push after an ajax request $context = new React\ZMQ\Context($loop); $pull = $context->getSocket(ZMQ::SOCKET_PULL); $pull->bind('tcp://127.0.0.1:5551'); // Binding to 127.0.0.1 means the only client that

Ratchet without Symfony session

五迷三道 提交于 2019-12-11 09:45:12
问题 I want to work with ratchet without Symfony session and handle session with php handler between my web application and ratchet. but it doesn't work. My code for session handling: Run server : session.php` ini_set('session.save_handler', 'memcached' ); ini_set('session.save_path', 'localhost:11211' ); use Ratchet\Server\IoServer; use Ratchet\WebSocket\WsServer; use MyApp\Chat; require dirname(__DIR__) . '/vendor/autoload.php'; require __DIR__ . './../src/MyApp/Chat.php'; $server = IoServer:

Websockets: Are Rachet & autobahn from npm compatible?

谁说胖子不能爱 提交于 2019-12-11 08:01:19
问题 I'm experimenting with the Ratchet php library. In particular, I've been trying to integrate their push integration demo into a React application. Their demo references a seemingly one-off version of the autobahn JS library, which works against my server implementation (a near duplicate of their demo). However, when I try to use autobahn JS from npm everything melts down. It seems this implementes a newer version of the Web Sockets protocol? The one-off version of autobahn passes wamp for the

Ratchet Session Data Synchronisation using memcache

扶醉桌前 提交于 2019-12-10 17:40:12
问题 I created a Ratchet Web Socket Server and tried to use SESSIONS. In my php file on the HTTP-Webserver (Port 80) I set the session-data like this use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler; $memcache = new Memcache; $memcache->connect('localhost', 11211); $storage = new NativeSessionStorage(array(), new MemcacheSessionHandler(

WebSockets + PHP (Ratchet) login system

泪湿孤枕 提交于 2019-12-10 15:32:59
问题 I know how to make a secure login system with PHP including basics like hashing, salting and more complex security measures. Recently I've been using Ratchet with WebSockets a lot. And I've been wondering if it is possible to create a secure register/login system using WebSockets. User enters his data in form. Data is validated and sanitized. Password is hashed. Everything is being sent to the server via WebSocket. PHP stores it in MySQL database and salts the password's hash. PHP returns a

Websocket multiple Channels vs. One Channel + Server Side handling [GroupChat]

不问归期 提交于 2019-12-10 13:36:48
问题 Let's say we want to create private chat rooms, where user can chat in small groups. A user can join multiple / x groups. In each case, I need to create a unique group on the server and subscribe user to these. Which approach is the recommended / more performant way: [1] On the server side, I create a Room class and add new room channels for each group chat, e.g. "chats/room-asdhqk1", "chats/room-fwuefhw1", "chats/room-awsdhqwd2". Now, some specified users can join this channel and are added

Rachet chat application - connection closed immediately after established when the app runs for a period of time

偶尔善良 提交于 2019-12-08 04:12:54
问题 We're using Laravel 4 together with Ratchet to create a chat application. Everything runs normally for about 14-20 hours. After a period of time the chat app stops to run. The connection gets established from the client to the server but right after that the server closes the connection. No errors get reported in our log files and the fact that we haven't been able to replicate the problem in our development environment doesn't help. Restarting the chat application on the server fixes the

What is the best way to use websockets along with PHP and MySQL scripts? [closed]

守給你的承諾、 提交于 2019-12-07 23:56:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . What is the best way to use websockets along with PHP and MySQL scripts? If I want to add a live chat to my PHP site, or store vars to the MySQL database when doing X action in real time (for a RPG website trading, for example). I have found Ratchet, it's a good choice to achieve those things efficiently? Maybe