walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.03k stars 2.25k forks source link

Websocket worker's onMessage doesn't intercept ping requests. #970

Open KiNGKiMO opened 8 months ago

KiNGKiMO commented 8 months ago

Hello, If a client sends "ping" request to workerman websocket worker, wrokerman auto replies with "pong" but I cannot catch that ping request at onMessage.

Any idea how to intercept a websocket worker's ping request?

tianyiw2013 commented 8 months ago

onWebSocketPing onWebSocketPong

KiNGKiMO commented 8 months ago

@tianyiw2013 Thank you so much, did not know that existed.

shunhua commented 8 months ago

onWebSocketPing onWebSocketPong

怎么使用?用的TP+workerman