public function setPort($port) {
        $this->port = $port;
        if ($this->port < 0 || $this->port > 65535) {
            throw new InvalidArgumentException('connection post is out of range');
        }
        return $this;
    }