예제 #1
0
 /**
  * Constructor
  *
  * @param   peer.InetAddress addr
  * @param   int netmask
  */
 public function __construct(InetAddress $addr, $netmask)
 {
     if (!is_int($netmask) || $netmask < 0 || $netmask > $addr->sizeInBits()) {
         throw new \lang\FormatException('Netmask must be integer, between 0 and ' . $addr->sizeInBits());
     }
     $this->address = $addr;
     $this->netmask = $netmask;
 }