public function setTransport($transport)
    {
        if (!in_array($transport,stream_get_transports())) {
            throw new \DomainException(sprintf('Unsupported type of transport "%s"', $transport));
        }

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