Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 26 18:02
    clue commented #83
  • Jan 26 18:02
    clue commented #83
  • Jan 26 18:02
    clue milestoned #83
  • Jan 26 18:00
    clue assigned #83
  • Jan 26 18:00
    clue unassigned #83
  • Jan 26 18:00
    clue assigned #83
  • Jan 26 18:00
    clue labeled #83
  • Jan 26 17:59

    clue on 2.x

    Replace deprecated at() Mocks Update PHPUnit configuration sc… Merge pull request #183 from Si… (compare)

  • Jan 26 17:59
    clue closed #183
  • Jan 26 16:42

    jsor on master

    Update example 63 to support v1… Merge pull request #400 from pa… (compare)

  • Jan 26 16:42
    jsor closed #400
  • Jan 26 16:41

    jsor on master

    Fix some typos, a mixed up para… Merge pull request #399 from pa… (compare)

  • Jan 26 16:41
    jsor closed #399
  • Jan 26 16:29
    mmoreram commented #18
  • Jan 26 15:20

    jsor on master

    Use GitHub actions for continuo… Merge pull request #442 from cl… (compare)

  • Jan 26 15:20
    jsor closed #442
  • Jan 26 15:18

    jsor on master

    Run tests on PHPUnit 9 Update PHPUnit configuration sc… Merge pull request #37 from Sim… (compare)

  • Jan 26 15:18
    jsor closed #37
  • Jan 26 12:41
    alexmorbo commented #91
  • Jan 26 12:07
    valzargaming opened #83
Christian Lück
@clue

@clue Thanks. I'm chating with @ahmard exactly about that. You may not understand my difficulty, but I am 64 years old and have many paradigms to break.

@carliedu Agreed, this is some hard stuff to digest no matter the age, but I guarantee it's worth the effort 🙌


@clue I figure it out myself, it was an issue on my side, and I'm on Linux :)

@edhelas Happy to hear! Guess it means I'm too slow with catching up with the chat here :)

Eduardo
@carliedu
@clue, on every stumble I took, I learned a little more. As I am retired and developing for myself only, for now, there is no pressure for deadlines. If I had a boss, I would have given up and gone looking for something quicker to understand.
Niklas Keller
@kelunik
@clue Speaking of the limit, PHP emits a warning if that happens, but the StreamSelectLoop implementation currently suppresses the warning.
Steve Pavarno
@pavarnos
hi all. Is there documentation somewhere on the various benefits / tradeoffs for each event loop implementation? https://github.com/reactphp/event-loop has a pretty good description of StreamSelectLoop, but not much detail of the others...
Cees-Jan Kiewiet
@WyriHaximus
Hey @pavarnos, they all do the same thing. Assuming you're on PHP 7, would suggest the ext-uv event loop
simonbuehler
@simonbuehler
hi, is there a way to json_encode a FulfilledPromise ? when returning an array from laravel the value where the promise/value was is always empty
simonbuehler
@simonbuehler
ok, hacked a pull request reactphp/promise#182
Eduardo
@carliedu
Hi @clue. I finally managed to do what I wanted (ReactPHP interacting with a formatted screen in the browser). The basis of everything was your project https://github.com/clue/php-sse-react/blob/master/examples/11-chat.php.
When you referred it, you commented it was "(bit dated, but nonetheless working)". In what sense did you make this comment? The example was perfect for me (simple).
Cees-Jan Kiewiet
@WyriHaximus
@simonbuehler What are you trying to do? (Except json_encoding a promise.)
@carliedu yay!
Eduardo
@carliedu
Hi @cboden. My project based on 11-chat.php is working. Another par of my project is to comunicate with a websocket server. I tested Pawl with this server and it works fine.
Now I'm trying to put both together, but ther is an incompatibility with react/socket.
" - ratchet/pawl v0.3.5 requires react/socket ^1.0 || ^0.8 || ^0.7 -> found react/socket[v0.7.0, ..., v0.8.12, v1.0.0, ..., v1.6.0] but the package is fixed to v0.4.6 (lock file version) by a partial update and that version does not match. ". Can you help me to resolve this? Thanks
Eduardo
@carliedu
@clue, do you suggest me any changes to 11-chat.php that can it "modernize" it to be compatible with Pawl?
I'm trying to make the reverse, beginning with Pawl and then add the same packets you use in 11-chat, but I see that there are a lot of incompatibilities, probably because old versions
Christian Lück
@clue

Hi @clue. I finally managed to do what I wanted (ReactPHP interacting with a formatted screen in the browser). The basis of everything was your project https://github.com/clue/php-sse-react/blob/master/examples/11-chat.php.
When you referred it, you commented it was "(bit dated, but nonetheless working)". In what sense did you make this comment? The example was perfect for me (simple).

@carliedu Happy to hear you've got this working! 👍

Currently working on a little something to provide more up to date examples 🤫
In the future, this should make it significantly easier to get started 🚀
If everything goes according to plan, I should be able to share a snippet in the next couple of weeks, but no promises

In the meantime, in case anybody feels like reviewing: reactphp/reactphp#442 /cc @WyriHaximus
Cees-Jan Kiewiet
@WyriHaximus
@clue suggesting some code changes as we type
Eduardo
@carliedu
@mbonneau, I could contact the webserver I need with Pawl, but I couldn’t find the __r

The __toString method you comment on Readme: Message:

This is the object received from a WebSocket server. It has a __toString method which is how most times you will want to access the data received. If you need to do binary messaging you will most likely need to use methods on the object.

Mark Kevin Besinga
@besingamkb
hello i am planing to use reactphp for our statistic api. i want to know if theres some tutorials or blogs on how to properly setup nginx or apache with reactphp. much better if theres also for docker images. thanks
Cees-Jan Kiewiet
@WyriHaximus
@besingamkb What are you going to build with ReactPHP? There is https://hub.docker.com/r/wyrihaximusnet/php that comes with extensions useful for ReactPHP
Mark Kevin Besinga
@besingamkb
im going to create an api that saves data into dynamodb. but i am not sure how can to setup it on production server with nginx or apache.
Cees-Jan Kiewiet
@WyriHaximus
@besingamkb Well the most important thing is to beaware that when using react/http to create an API you need something to start your service when the server it runs on restarts, and also restrts it when it for whatever reasons crashes. nginx or apache in this instance would only reverse HTTP proxies, and you need to adjust their configuration accordingly.
Christian Lück
@clue
@besingamkb nginx's proxy_pass and a systemd service unit are pretty much all you need to get this up and running. I've set this up in a number of client projects, but I'm not aware of any public resources at the moment, I'm afraid
Mark Kevin Besinga
@besingamkb
thank you i'll give it a shot
iorsa
@iorsa
Hi! Any possible explanations why $wsServer->enableKeepAlive() should be necessary (with timeout lesser than 30 seconds) in order to keep ws connection from firefox browser alive? @cboden @mbonneau Haven't tried it on chrome browser yet
iorsa
@iorsa
Checked in chrome - same result. If I set timeout to 29 seconds or lesser the connection is uninterruptible. Connection is definitely closed from server. Close event.code is 1006
Max
@mstaack
hey there
may anyone give me a hint on how to cleanly stream a remote http response basically like nginx proxy would?
example currently:
This message was deleted
Christian Lück
@clue
Chris Boden
@cboden
@iorsa Can you provide more information please? 1006 is abnormal closing, but I don't recall Ratchet explicitly using this. Are you sure it's not coming from the client side?
@carliedu Could you provide your compose.json file in a gist please? I'll try to take a look at the composer conflicts you're having and see if we can either nail down some versions or correct some of the Ratchet librarie's files.
Eduardo
@carliedu
Hi @cboden, I will look at what test project I was working on jan, 21. I have made a lot different until now.
iorsa
@iorsa
@cboden I'm sorry. I've found that this problem occurred only when I was running ws server under nginx at remote host. When I run it locally with plain php - it works fine without using ->enableKeepAlive(). I've found that after increasing nginx's proxy_read_timeout in ws location connection had stopped breaking. So it's definitely not ratchet issue, but nginx one.
Looks like pinging the server via ratchet's ->enableKeepAlive() is an alternative way to bypass this problem, so this is why it helped.
Christian Lück
@clue

@carliedu Could you provide your compose.json file in a gist please? I'll try to take a look at the composer conflicts you're having and see if we can either nail down some versions or correct some of the Ratchet librarie's files.

@iorsa @cboden This is not an issue in Pawl. I've updated https://github.com/clue/php-sse-react in the meantime, you can use the newest version which should be compatible with current Pawl 👍

@cboden, the same is what you asked for
Eduardo
@carliedu
@clue and @cboden. I've made good progress so far. Now I'm trying to create a class with Pawl to connect, send and receive data to / from the websocket server. Without a class, I already managed to make it work, now encapsulating everything in a class is what is being my problem. Embed the excerpt:
$ ConnFXBT ($ UriWebsocketSever, ['protocol1', 'subprotocol2'], ['Origin' => 'http: // localhost'])
-> then (function (Ratchet \ Client \ WebSocket $ WSconn) {...
in class is not working.
Eduardo
@carliedu
My idea is to create methods to send() on-message() on-close(). Is it possible?
Steve Pavarno
@pavarnos
I'm using clue/reactphp-flux to send a queue of concurrent requests to an API endpoint (up to 100 at a time, concurrency of 20). This was working fine until this morning when the API lowered their rate limits (10 requests per second, 100,000 per day). I remember seeing somewhere a reactphp package that would hold a queue of promises (http requests) and feed them out slowly to stay within the rate limits. But I cannot find it again... can anyone paste a link? thank you!