morozovsk / websocket

simple php websocket server + demos + yii/yii2 integration + php 7 support
368 stars 74 forks source link

Where we write code that run continuously? #24

Closed kamalsamra closed 7 years ago

morozovsk commented 8 years ago

"nohup php index.php start &" https://github.com/morozovsk/websocket

kamalsamra commented 8 years ago

I know this but in this i have to run one function which is continuously check data from database so in which function i wrote that code like in normal php websocket we write it in tick function

morozovsk commented 8 years ago

You can use onTimer() for examle: https://github.com/morozovsk/websocket-examples/blob/master/game/server/GameWebsocketDaemonHandler.php