Code Monkey home page Code Monkey logo

Comments (6)

walkor avatar walkor commented on July 21, 2024

debug方式运行(php start.php start),看看有没有什么报错。
一般是参数传错了

from gatewayworker.

skyfister avatar skyfister commented on July 21, 2024

没有报错哈,debug模式下运行过

from gatewayworker.

walkor avatar walkor commented on July 21, 2024

可能是参数传错了,打下日志看看吧。client_id是否对。
也可以抓包看看,或者下载workerman-chat,这个聊天室有sendToClient私聊的功能,看是否正常。
没有报错,没有日志我这确实很难定位

from gatewayworker.

skyfister avatar skyfister commented on July 21, 2024

日志没有报错哈,Gateway::sendToClient($client_id, json_encode(["type" => "message", 'content' => $msg->content])); Gateway::sendToAll(json_encode(["type" => "message", "clientId" => $client_id, 'content' => $msg->content])); 第一个收不到,第二个能收到,那我先试试workerman-chat

from gatewayworker.

skyfister avatar skyfister commented on July 21, 2024

$client_id直接用的客户端上报的那个参数,public static function onMessage($client_id, $message) {

from gatewayworker.

skyfister avatar skyfister commented on July 21, 2024

已解决,registerAddress端口没有统一设置成1236,自己给自己挖了个坑,谢了

from gatewayworker.

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.