コード例 #1
0
ファイル: ContentAbstract.php プロジェクト: rnaga/php-tls
 public function encodeAlert($data)
 {
     $core = $this->core;
     $alert = new Alert();
     $alert->encode($data);
     $this->content = $alert;
     $core->isClosed = true;
     if ($alert->getDescCode() != Alert::CLOSE_NOTIFY) {
         throw new TLSAlertException($alert, "Alert received from peer");
     }
 }