new connection from ip 192.168.0.3
connection closed
new connection from ip 192.168.0.3
connection closed
new connection from ip 192.168.0.3
connection closed
new connection from ip 192.168.0.3
connection closed
new connection from ip 192.168.0.3
connection closed
new connection from ip 192.168.0.3
$ php start.php status
Workerman status
Workerman not run
PHP Warning: readfile(/var/folders/f3/wm99g0j500n3ytswgpk0f4j00000gn/T/workerman.status): failed to open stream: No such file or directory in /Workerman/Worker.php on line 520
Warning: readfile(/var/folders/f3/wm99g0j500n3ytswgpk0f4j00000gn/T/workerman.status): failed to open stream: No such file or directory in /Workerman/Worker.php on line 520
我两边都实现协议了
服务端:$worker = new Worker('websocket://0.0.0.0:8484');
客户端:mSocket = IO.socket("websocket://192.168.0.11:8484");
可是会出现马上断开的情况。。
上面是运行php start.php status 返回的信息。/Workerman/Worker.php 这个路径明明就存在怎么会说不存在呢?
服务端代码:
客户端代码:用的是socket.io
为什么会出现刚连接就断开的情况呢,信息也没有收到
任何客户端都可以与workerman通讯,只要在workerman实现其协议即可。
socket.io也是一样,有自己的应用层协议,在workerman实现这个协议就能直接使用了
我两边都实现协议了
服务端:$worker = new Worker('websocket://0.0.0.0:8484');
客户端:mSocket = IO.socket("websocket://192.168.0.11:8484");
可是会出现马上断开的情况。。
上面是运行php start.php status 返回的信息。/Workerman/Worker.php 这个路径明明就存在怎么会说不存在呢?
php -v
和
php -m
贴下
php -v
PHP 5.5.27 (cli) (built: Jul 14 2015 17:04:01)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
php -m
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
这个最好抓包看下,是谁关闭的连接,这样才好查问题
抓包参见手册 http://doc.workerman.net/debug/tcpdump.html
https://github.com/walkor/phpsocket.io
基于workerman实现的Socket.IO 可以直接使用