mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-02-20 23:18:22 +00:00
One more initTAddress().
This commit is contained in:
parent
525aaf6837
commit
708e581c62
@ -179,6 +179,12 @@ proc initTAddress*(address: string, port: int): TransportAddress =
|
||||
except:
|
||||
raise newException(TransportAddressError, getCurrentException().msg)
|
||||
|
||||
proc initTAddress*(address: IpAddress, port: Port): TransportAddress =
|
||||
## Initialize ``TransportAddress`` with net.nim ``IpAddress`` and
|
||||
## port number ``port``.
|
||||
result.address = address
|
||||
result.port = port
|
||||
|
||||
proc getAddrInfo(address: string, port: Port, domain: Domain,
|
||||
sockType: SockType = SockType.SOCK_STREAM,
|
||||
protocol: Protocol = Protocol.IPPROTO_TCP): ptr AddrInfo =
|
||||
|
Loading…
x
Reference in New Issue
Block a user