當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SimpleTestCompatibility::setTimeout方法代碼示例

本文整理匯總了PHP中SimpleTestCompatibility::setTimeout方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleTestCompatibility::setTimeout方法的具體用法?PHP SimpleTestCompatibility::setTimeout怎麽用?PHP SimpleTestCompatibility::setTimeout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SimpleTestCompatibility的用法示例。


在下文中一共展示了SimpleTestCompatibility::setTimeout方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: SimpleSocket

 function SimpleSocket($host, $port, $timeout, $block_size = 255)
 {
     $this->SimpleStickyError();
     if (!($this->_handle = $this->_openSocket($host, $port, $error_number, $error, $timeout))) {
         $this->_setError("Cannot open [{$host}:{$port}] with [{$error}] within [{$timeout}] seconds");
         return;
     }
     $this->_is_open = true;
     $this->_block_size = $block_size;
     SimpleTestCompatibility::setTimeout($this->_handle, $timeout);
 }
開發者ID:BackupTheBerlios,項目名稱:phpbase-svn,代碼行數:11,代碼來源:socket.php

示例2: SimpleSocket

 /**
  *    Opens a socket for reading and writing.
  *    @param string $host      Hostname to send request to.
  *    @param integer $port     Port on remote machine to open.
  *    @param integer $timeout  Connection timeout in seconds.
  *    @access public
  */
 function SimpleSocket($host, $port, $timeout)
 {
     $this->StickyError();
     $this->_is_open = false;
     if (!($this->_handle = $this->_openSocket($host, $port, $error_number, $error, $timeout))) {
         $this->_setError("Cannot open [{$host}:{$port}] with [{$error}] within [{$timeout}] seconds");
     } else {
         $this->_is_open = true;
         SimpleTestCompatibility::setTimeout($this->_handle, $timeout);
     }
 }
開發者ID:printedheart,項目名稱:iwfms,代碼行數:18,代碼來源:socket.php

示例3: __construct

 /**
  *    Opens a socket for reading and writing.
  *    @param string $host          Hostname to send request to.
  *    @param integer $port         Port on remote machine to open.
  *    @param integer $timeout      Connection timeout in seconds.
  *    @param integer $block_size   Size of chunk to read.
  *    @access public
  */
 function __construct($host, $port, $timeout, $block_size = 255)
 {
     parent::__construct();
     if (!($this->handle = $this->openSocket($host, $port, $error_number, $error, $timeout))) {
         $this->setError("Cannot open [{$host}:{$port}] with [{$error}] within [{$timeout}] seconds");
         return;
     }
     $this->is_open = true;
     $this->block_size = $block_size;
     SimpleTestCompatibility::setTimeout($this->handle, $timeout);
 }
開發者ID:ngugijames,項目名稱:ThinkUp,代碼行數:19,代碼來源:socket.php


注:本文中的SimpleTestCompatibility::setTimeout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。