Exemplo n.º 1
0
 public function __construct(Download $download, $url)
 {
     parent::__construct($download, $url);
     if (!preg_match('#^udp://([^\\:]+)\\:(\\d+)#', $url, $match)) {
         $this->error = "Cannot parse URL";
         return;
     }
     $this->ip = gethostbyname($match[1]);
     if (!Util::isIPv4($this->ip)) {
         $this->error = "Unable to resolve IP for '{$url}'";
         return;
     }
     $this->port = (int) $match[2];
     if ($this->port <= 0) {
         $this->error = "Unable to parse UDP port";
         return;
     }
     $this->transID = rand();
     $this->connectionID = null;
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
 }
Exemplo n.º 3
0
 public function __construct(Download $download, $url)
 {
     parent::__construct($download, $url);
 }