Route requests to Laravel Controller to running WebSocket server

后端 未结 1 2020
被撕碎了的回忆
被撕碎了的回忆 2021-01-16 00:18

The situation:

There is a long-running task that needs to be launched asynchronously. The details of this task aren\'t really all that important (the basics are tha

相关标签:
1条回答
  • 2021-01-16 00:41

    The answer here appears to be that I need to create a WebSocket client in PHP that will send messages to the WebSocket server, the same as a client written in JavaScript would. For any interested viewers struggling with the same issue, I was able to find a few WebSocket Clients written in PHP:

    1. https://github.com/gabrielbull/php-websocket-client
    2. https://github.com/Devristo/phpws
    3. https://github.com/symbiose/php-websocket-client (<-- This is the one I wound up going with)

    I'll be leaving this question open for awhile in case anyone comes up with a different idea / better client library to use.

    0 讨论(0)
提交回复
热议问题