mirror of
https://github.com/php-win-ext/phpy.git
synced 2026-03-25 01:12:16 +01:00
13 lines
205 B
Python
13 lines
205 B
Python
from php import swoole
|
|
|
|
|
|
def on_receive(serv, fd, tid, data):
|
|
print(serv)
|
|
print(data)
|
|
s.send(fd, "Swoole: " + data)
|
|
|
|
|
|
s = swoole.Server("127.0.0.1", 9501)
|
|
s.on('receive', on_receive)
|
|
s.start()
|