|
|
@ -22,7 +22,7 @@ async def read_forever(server: Server, client: Client) -> None: |
|
|
|
await handle_cmd(server, client, msg) |
|
|
|
|
|
|
|
|
|
|
|
async def main() -> None: |
|
|
|
async def serve() -> None: |
|
|
|
bind_addr = os.getenv("BIND_ADDR") or "0.0.0.0" |
|
|
|
port = os.getenv("PORT") or 6667 |
|
|
|
|
|
|
@ -50,5 +50,10 @@ async def main() -> None: |
|
|
|
await server.serve_forever() |
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
asyncio.run(serve()) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
asyncio.run(main()) |
|
|
|
main() |
|
|
|
|