Questions tagged [reactphp]

React is a low-level library for event-driven programming in PHP.

Event-driven, non-blocking I/O with PHP. http://reactphp.org/ React is a low-level library for event-driven programming in PHP. At its core is an event loop, on top of which it provides low-level utilities, such as: Streams abstraction, async dns resolver, network client/server, http client/server, interaction with processes. Third-party libraries can use these components to create async network clients/servers and more.

The event loop is based on the reactor pattern (hence the name) and strongly inspired by libraries such as EventMachine (Ruby), Twisted (Python) and Node.js (V8).

172 questions
1
vote
2 answers

Is there a way to reloaded an already loaded PHP class?

Once a PHP object is already loaded on PHP, is there a way to reload it? The motivation of this question is a PHP watcher in a ReactPHP server. Using ReactPHP, the kernel can be reloaded without having to stopping the server itself, but even if one…
mmoreram
  • 687
  • 5
  • 13
1
vote
0 answers

How to connect php-ratchet with php-zeromq in Centos 7

I have a problem with sending messages from ZeroMq to Ratchet-PHP. I've switched from Windows to Linux Centos 7.When I developed on Windows my code worked. When I check my php-zmq version with php --ri zmq: zmq ZMQ extension => enabled ZMQ…
Davosss
  • 61
  • 1
  • 7
1
vote
1 answer

RatchetPHP - Client gets disconnected from server right before receiving a message from the server

So, im trying the Ratchet tutorial (http://socketo.me/docs/hello-world) and i have a problem: Everytime the send() method is called on a ConnectionInterface object, this client gets disconnected from server. Example below: SSH terminal php…
1
vote
1 answer

Do you need Composer for async PHP and a HTTP server like ReactPHP or Swoole?

From my understand Composer is used to autoload classes via the SPL function provided by PHP, or at least register the method to call when the class does not exist. This then has to happen upon every request for a traditional setup with Laravel or…
tty2018
  • 45
  • 1
  • 6
1
vote
1 answer

I'm unable to cross communicate with ReactPHP's Pawl and Ratchet

I'm currently attempting to connect to two different socket servers. One of them is essentially an IRC connection, the other is an interface server that I've made myself. These two loops need to be able to communicate with each other, but I'm having…
ZeekDaGeek
  • 21
  • 4
1
vote
1 answer

How to connect android client to ReactPHP socket server

I have ReactPHP socket server that communicate with ReactPHP clients, but I need the same with android client. How can I do that, I have some client android app but It won't connect. Can some help with some sample code, or some explanation. I am new…
Andry Jhonas
  • 379
  • 2
  • 13
1
vote
1 answer

How async request handling in real cases works?

Most tutorials I have seen for Node JS/ReactPHP is more like, that you don't need to wait a 5 seconds timer to echo something. EventLoop can handle that later. Like This Example Below (Note this is non-language dependent): timer(run 5 seconds…
1
vote
2 answers

Push message to websockets with ratchet php and without ZeroMQ

I try to make websocket server with rachet and pawl. I read doc ratchet with ZeroMQ http://socketo.me/docs/push But can't run it with Pawl https://github.com/ratchetphp/Pawl I create client: