I don’t know what you mean.
The code is very simple:
On the server:
:
@anvil.server.callable
def on_connect(msg=''):
print(f"on_connect {msg}")
@anvil.server.callable
def on_every_connect(msg=''):
print(f"on_every_connect {msg}")
On the Pico:
:
async def on_connect(seconds):
await anvil.pico.call("on_connect", '')
async def on_every_connect(msg):
await anvil.pico.call("on_every_connect", msg)
anvil.pico.connect(UPLINK_KEY, on_connect(5), on_every_connect=on_every_connect(BOARD_NAME))
As you can see, no string “server:” in sight. And the print statements run on the server not on the Pico.