操作系统:windows10
PHP版本:php7.4
workerman版本:4
$worker = new Worker('http://0.0.0.0:8888');
服务成功启动后,客户端发送的原始数据TCP包正好为 512
个字节的话,$worker
实例的onMessage
回调无响应。
发送的HTTP请求数据示例如下(有换行符):
GET /tile/?qt=vtile&x=385&y=142&z=11&styles=pl&scaler=2&udt=20220811&from=jsapi3_0 HTTP/1.1
Host: 192.168.20.120:8888
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
DNT: 1
Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
Referer: http://localhost:50000/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
应该正确响应客户端请求。