IPv4.fromCidr constructor

IPv4.fromCidr(
  1. String ip,
  2. int cidr
)

Creates an IPv4 address with the network mask that matches the given CIDR value.

Implementation

IPv4.fromCidr(this.ip, int cidr)
		: mask = cidrToMask(cidr);