status-im / nim-chronos

Chronos - An efficient library for asynchronous programming
https://status-im.github.io/nim-chronos/docs/chronos
Apache License 2.0
353 stars 51 forks source link

IpNet refactoring #354

Closed cheatfate closed 1 year ago

cheatfate commented 1 year ago
  1. Remove result usage.
  2. Switch from cast[T] usage to endians2 usage.
  3. Add more IPv4 and IPv6 helpers for TransportAddress checks and tests for it.
  4. Add isGlobal() procedure to check IPv4 and IPv6 addresses are globally reachable (e.g. public). Add proper tests.
  5. isUnspecified() check now checks for 0.0.0.0 and become alias for isZero() and isNone() check now checks for AdressFamily.None.

This PR superseeds https://github.com/status-im/nim-chronos/pull/352