import websockets;
import asyncio;


async def handler(websocket):
    while True:
        #Save the incoming message in variable message.
        message = await websocket.recv()
        print(message)


async def main():
    async with websockets.serve(handler, "145.92.8.114" , 8001):
        await asyncio.Future()  # run forever


if __name__ == "__main__":
    asyncio.run(main())


#https://websockets.readthedocs.io/en/stable/reference/sync/server.html#websockets.sync.server.serve