raklib\protocol\Packet::putAddress PHP Method

putAddress() protected method

protected putAddress ( $addr, $port, $version = 4 )
    protected function putAddress($addr, $port, $version = 4)
    {
        $this->putByte($version);
        if ($version === 4) {
            foreach (explode(".", $addr) as $b) {
                $this->putByte(~(int) $b & 0xff);
            }
            $this->putShort($port);
        } else {
            //IPv6
        }
    }