@author: shenzhe (泽泽,半桶水)
@email: [email protected]
集成了zphp相关的demo,每个demo内部有详细的readme
所需的zphp框架git: https://github.com/shenzhe/zphp (git clone到此目录)
zphp相关demo集
@author: shenzhe (泽泽,半桶水)
@email: [email protected]
集成了zphp相关的demo,每个demo内部有详细的readme
所需的zphp框架git: https://github.com/shenzhe/zphp (git clone到此目录)
eric@debian:~/phpcode/project/jklapi$ php webroot/main.php socket
{"className":"Exception","message":"no class socket\Swoole","code":-1,"file":"/home/eric/phpcode/project/jklapi/vendor/zphp/zphp/ZPHP/Core/Factory.php","line":22,"userAgent":"","trace":[{"file":"/home/eric/phpcode/project/jklapi/vendor/zphp/zphp/ZPHP/Server/Adapter/Socket.php","line":27,"function":"getInstance","args":["'socket\\Swoole'"],"class":"ZPHP\Core\Factory","type":"::"},{"file":"/home/eric/phpcode/project/jklapi/vendor/zphp/zphp/ZPHP/ZPHP.php","line":219,"function":"run","args":[],"class":"ZPHP\Server\Adapter\Socket","type":"->"},{"file":"/home/eric/phpcode/project/jklapi/webroot/main.php","line":6,"function":"run","args":["'/home/eric/phpcode/project/jklapi'"],"class":"ZPHP\ZPHP","type":"::"}],"server":{"TERM":"xterm","SHELL":"/bin/bash","SSH_CLIENT":"192.168.1.5 55630 22","SSH_TTY":"/dev/pts/0","USER":"eric","LS_COLORS":"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:","MAIL":"/var/mail/eric","PATH":"/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/php7/bin","PWD":"/home/eric/phpcode/project/jklapi","LANG":"en_US.UTF-8","SHLVL":"1","HOME":"/home/eric","LOGNAME":"eric","SSH_CONNECTION":"192.168.1.5 55630 192.168.1.7 22","_":"/opt/php7/bin/php","OLDPWD":"/home/eric/phpcode/project/jklapi/vendor","PHP_SELF":"webroot/main.php","SCRIPT_NAME":"webroot/main.php","SCRIPT_FILENAME":"webroot/main.php","PATH_TRANSLATED":"webroot/main.php","DOCUMENT_ROOT":"","REQUEST_TIME_FLOAT":1484547814.344754,"REQUEST_TIME":1484547814,"argv":["webroot/main.php","socket"],"argc":2}}[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/php-7.1.0/Zend/zend_string.h(122) : Freeing 0xb6a647f8 (20 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/swoole/swoole_server.c(1427) : Freeing 0xb6a64848 (16 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/swoole/swoole_server.c(293) : Freeing 0xb6a64c58 (16 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/php-7.1.0/Zend/zend_API.c(1060) : Freeing 0xb6a6de00 (44 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
Last leak repeated 2 times
[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/php-7.1.0/Zend/zend_objects.c(171) : Freeing 0xb6a80ab0 (24 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
Last leak repeated 2 times
[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/php-7.1.0/Zend/zend_hash.c(133) : Freeing 0xb6a9f0e0 (200 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
[Mon Jan 16 14:23:34 2017] Script: '/home/eric/phpcode/project/jklapi/webroot/main.php'
/home/eric/software/php-7.1.0/Zend/zend_hash.c(862) : Freeing 0xb6aa4000 (448 bytes), script=/home/eric/phpcode/project/jklapi/webroot/main.php
swoole 版本2.0.5
php版本:7.1
35行:
public function wsOnOpen($fd, $data)
改为:
public function wsOnOpen($fd)才可以运行
请问ZChat有用到Websocket吗?
现在的数据传输方式好像是固定的,支持二进制数据自定义包头吗
为什么运行zchat demo 返回chat.js:142 error:Error #2048
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.