public function setAddressType($addressType)
    {
        if (!in_array($addressType,
            array(
                AF_INET,
                AF_INET6,
                AF_UNIX
            )
        )) {
            throw new \DomainException('Unsupported address type');
        }

        $this->addressType = $addressType;
        return $this;
    }