Giter Site home page Giter Site logo

Comments (8)

walkor avatar walkor commented on May 11, 2024 2

webman 也可以像workerman那样监听websocket。参见手册 https://www.workerman.net/doc/webman#/process

from webman.

avriltank avatar avriltank commented on May 11, 2024

非常给力!谢谢大佬,看文档没看到这里

from webman.

cexll avatar cexll commented on May 11, 2024

提问, webman可以接入Gateway吗, 具体配置应该怎么设置呢,

from webman.

walkor avatar walkor commented on May 11, 2024

http://doc2.workerman.net/work-with-other-frameworks.html

from webman.

cexll avatar cexll commented on May 11, 2024

http://doc2.workerman.net/work-with-other-frameworks.html

process 配置文件

use GatewayWorker\Lib\Gateway;

public function onConnect($client_id)
{
        echo "onConnect\n";
}
public function onMessage($client_id , $message)
{
        Gateway::sendToCurrentClient($message);
}

config/process.php

'websocket'  => [
        'handler'  => process\GatewayWebsocket::class,
        'listen' => 'websocket://0.0.0.0:8888',
        'count'  => 10,
    ],
php start.php start

这样启动Gateway, 想实现这种, 在其他demo里面出了BusinessRegister 应该是缺少了这两个(? )

from webman.

walkor avatar walkor commented on May 11, 2024

把webman的代码和gatewayWorker融合没有什么意义。如果你需要webman里某个组件,可以直接composer安装使用,没有必要把二者在代码层面融合在一起。

from webman.

cexll avatar cexll commented on May 11, 2024

不是, 是想webman结合Gateway, 有方便的Uid操作, 想问下可不可以支持

from webman.

cexll avatar cexll commented on May 11, 2024

麻烦主动close一下

from webman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.