Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jake
    @madjake
    hey everybody - any insight into how I should configure the number of workers with swoole?
    Sina Salek
    @sinasalek
    Anyway to communicate between workers?
    hmpmarketing
    @hmpmarketing
    Hello all!!
    issue with swoole breaking my env vars? I get Undefined index: REMOTE_ADDR on $_SERVER['REMOTE_ADDR'];
    this is laravel 5.5
    Prasetyo
    @praswicaksono
    @hmpmarketing check that value on swoole request it exist or not
    i01000001
    @i01000001
    Hi I am looking for Swoole adoption stats. Is there any public link that lists implementation using Swoole ?
    Wulfklaue
    @Wulfklaue

    As far as i know their is no list of implementations of Swoole. Tencent ( wechat = big communication platform in China, like WhatsApp ) uses Swoole.

    https://github.com/Tencent/tsf

    But if this is in production or not, is unclear to me.

    Swoole is a impressive tech but the fact that most users are Chinese creates a language barrier and is limiting its popularity and adoption rates in Western Countries.

    Just for fun some local benchmarks ...

    NodeJS Hello World ( 50% system usage ) 10k, Swoole 110K req/s ( 90% system usage ).

    OSREC Technologies
    @osrec
    Hi Guys, I was looking at the implementation of a MySQLPool class here: https://github.com/yangxikun/swoole2-mysqlpool/blob/master/MySQLPool.php Can someone explain what \Swoole\Coroutine::suspend and \Swoole\Coroutine::resume do? I couldn't find much documentation around them
    Serge
    @bluetazmanian
    Hello, I’m having issues installing it on Mac using brew. Can anyone help?
    @teknohan can you assist with the above question?
    sunznx
    @sunznx
    pecl install swoole
    yo调调
    @Music-man-hl
    哟哟,讲中文
    flddr
    @flddr
    Hi guys - great to see a swoole channel :)
    evgeniy123
    @evgeniy123
    How do I make a call from the controller to send some message to the socket without creating an id connection?
    Jony-J
    @Jony-J
    say something ~ guys
    Mev-Rael
    @Mevrael
    Anybody in Hong Kong or anywhere nearby in terms of timezone?
    flddr
    @flddr
    @Jony-J @Mevrael you can join the slack channel https://www.swoole.co.uk/community
    Jony-J
    @Jony-J
    okey
    Sascha-Oliver Prolic
    @prolic
    Hi
    Any swoole experts around?
    Freek Gruntjes
    @Fgruntjes
    Hello first of all thnx guys for the great extension!
    Was wondering if you can start workers for a http server before the requests come in? Would like to be able to start the workers and let them wait for a new request to come in.
    Ignacio El Kadre
    @imefisto
    Hi. The workers start after server starts.
    Ignacio El Kadre
    @imefisto

    Let me put an example:

    $http = new swoole_http_server("127.0.0.1", 9501);
    
    $http->set([
        'worker_num' => 4,
        'dispatch_mode' => 1,
    ]);
    
    $http->on('WorkerStart', function ($server, $workerId) {
        echo 'Worker started: ' . $workerId . PHP_EOL;
    });
    
    $http->on('request', function ($request, $response) {
        $response->header("Content-Type", "text/plain");
        $response->end("Hello World\n");
    });
    
    $http->start();

    When you start this script, you should see the "Worker started" messages

    Marc Faussurier
    @MarcFaussurier
    Hello everyone, is someone available ? I am currently having issue with mysql coroutine
    Ignacio El Kadre
    @imefisto
    @MarcFaussurier You've got an answer in github
    Crtrpt
    @Crtrpt
    hi
    dboss
    @lempx
    这事官方群?
    aa
    jingdor
    @jingdor
    hi
    Isidro Hernández Gregorio
    @Isidro-hernndez
    hi
    sorry for the question, has anyone set up swoole as an nginx http server?
    Sina Bahrami
    @dearsina
    I have started using the Swoole WebSockets Server, so far it's been pretty easy to set up, although the documentation is lacking and or in Chinese. :-)
    The biggest issue has been that the examples seem to span a few different versions, and it's difficult to ascertain which example is still "current".
    jmjoy
    @jmjoy
    How can I make a global variable with the scope of on request?
    Jake Pucan
    @ljfreelancer88
    @jmjoy I think you can use the use.
    $server->on("message", function (Server $server, Frame $frame) use ($mysql, $session) {
    $server->push($frame->fd, "Hello {$frame->data}");
    });
    
    
    $server->on("message", function (Server $server, Frame $frame) use ($mysql, $session) { $server->push($frame->fd, "Hello {$frame->data}"); });
    Jake Pucan
    @ljfreelancer88
    How to implement back-pressure in swoole websocket server? Thank you in advance.
    titonova
    @titonova
    Does anyone have an idea on how to integrate swoole with codeigniter 4
    hossein jarrahi
    @hosseinjarrahi
    hello .is there a english course for swoole?
    Bruce Dou
    @doubaokun
    Please check: https://swoolebook.com/
    Peter-Ma
    @peter-wow
    are you ok ?
    Peter-Ma
    @peter-wow
    no body no think
    Martín Durán
    @maduranma
    hi