diff --git a/examples/client/asyncio/latency_client.py b/examples/client/asyncio/latency_client.py
index e8923de..b977a3f 100644
--- a/examples/client/asyncio/latency_client.py
+++ b/examples/client/asyncio/latency_client.py
@@ -13,14 +13,14 @@ async def send_ping():
await sio.emit('ping_from_client')
-@sio.on('connect')
-async def on_connect():
+@sio.event
+async def connect():
print('connected to server')
await send_ping()
-@sio.on('pong_from_server')
-async def on_pong(data):
+@sio.event
+async def pong_from_server(data):
global start_timer
latency = time.time() - start_timer
print('latency is {0:.2f} ms'.format(latency * 1000))
diff --git a/examples/client/threads/latency_client.py b/examples/client/threads/latency_client.py
index c08b359..a934e48 100644
--- a/examples/client/threads/latency_client.py
+++ b/examples/client/threads/latency_client.py
@@ -11,14 +11,14 @@ def send_ping():
sio.emit('ping_from_client')
-@sio.on('connect')
-def on_connect():
+@sio.event
+def connect():
print('connected to server')
send_ping()
-@sio.on('pong_from_server')
-def on_pong(data):
+@sio.event
+def pong_from_server(data):
global start_timer
latency = time.time() - start_timer
print('latency is {0:.2f} ms'.format(latency * 1000))
diff --git a/examples/server/aiohttp/app.html b/examples/server/aiohttp/app.html
index d71ebd2..ff896b0 100755
--- a/examples/server/aiohttp/app.html
+++ b/examples/server/aiohttp/app.html
@@ -6,16 +6,15 @@