fix deprecations and other warnings (#13748)
This commit is contained in:
parent
182d3c16e3
commit
5b55aa52d0
22 changed files with 63 additions and 66 deletions
|
|
@ -13,7 +13,7 @@ proc setupServerSocket(hostname: string, port: Port, domain: Domain): AsyncFD =
|
|||
## Creates a socket, binds it to the specified address, and starts listening for connections.
|
||||
## Registers the descriptor with the dispatcher of the current thread
|
||||
## Raises OSError in case of an error.
|
||||
let fd = newNativeSocket(domain)
|
||||
let fd = createNativeSocket(domain)
|
||||
setSockOptInt(fd, SOL_SOCKET, SO_REUSEADDR, 1)
|
||||
var aiList = getAddrInfo(hostname, port, domain)
|
||||
if bindAddr(fd, aiList.ai_addr, aiList.ai_addrlen.Socklen) < 0'i32:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue