Exemplo n.º 1
0
 protected function buildHeaderArrayHixie76()
 {
     $this->hixieKey1 = WebSocketFunctions::randHixieKey();
     $this->hixieKey2 = WebSocketFunctions::randHixieKey();
     $this->headers = array("GET" => "{$this->url} HTTP/1.1", "Connection:" => "Upgrade", "Host:" => "{$this->host}:{$this->port}", "Origin:" => "{$this->origin}", "Sec-WebSocket-Key1:" => "{$this->hixieKey1->key}", "Sec-WebSocket-Key2:" => "{$this->hixieKey2->key}", "Upgrade:" => "websocket", "Sec-WebSocket-Protocol: " => "hiwavenet");
     return $this->headers;
 }