I've been looking over the chat example here:
[https://nim-lang.org/docs/asyncnet.html](https://nim-lang.org/docs/asyncnet.html)
I was trying to make a const port number, like so:
const
PORT = 9000
server.bindAddr(Port(PORT))
Run
However, I receive an error:
Error: attempting to call routine: 'Port'
found 'PORT' of kind 'const'
Run
So looked at bindAddr's parameters: > proc bindAddr(socket: AsyncSocket; port =
Port(0); address = "") {...}
Some questions:
> * How come **server.bindAddr(Port(PORT))** works, when the first parameter
> of bindAddr uses a socket, not a port?
> * How come my const PORT isn't working?
>