<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.sockets.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.socket-clear-error.php',
    1 => 'socket_clear_error',
    2 => '清除套接字或者最后的错误代码上的错误',
  ),
  'up' => 
  array (
    0 => 'ref.sockets.php',
    1 => 'Socket 函数',
  ),
  'prev' => 
  array (
    0 => 'function.socket-bind.php',
    1 => 'socket_bind',
  ),
  'next' => 
  array (
    0 => 'function.socket-close.php',
    1 => 'socket_close',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/sockets/functions/socket-clear-error.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.socket-clear-error" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">socket_clear_error</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">socket_clear_error</span> &mdash; <span class="dc-title">清除套接字或者最后的错误代码上的错误</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.socket-clear-error-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>socket_clear_error</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.socket.php" class="type Socket">Socket</a></span></span> <code class="parameter">$socket</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   这个函数清除给定的套接字上的错误代码或是最后一个全局的套接字如果套接字没有指定的话。
  </p>
  <p class="para">
   这个函数允许明确的重置错误代码值 不论是一个套接字或者最后全局错误代码的扩展，
   这对在检测应用的一部分是否有错误发生是十分有用的。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.socket-clear-error-parameters">
   <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">socket</code></dt>
     <dd>
      <p class="para">
       用 <span class="function"><a href="function.socket-create.php" class="function">socket_create()</a></span> 创建的 <span class="classname"><a href="class.socket.php" class="classname">Socket</a></span> 实例。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.socket-clear-error-returnvalues">
 <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.socket-clear-error-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
  <td>8.0.0</td>
  <td>
   现在 <code class="parameter">socket</code> 是 <span class="classname"><a href="class.socket.php" class="classname">Socket</a></span> 实例，
   之前是 <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>。
  </td>
 </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       参数 <code class="parameter">socket</code> 可以为 null。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.socket-clear-error-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.socket-last-error.php" class="function" rel="rdfs-seeAlso">socket_last_error()</a> - 返回套接字上的最后一个错误</span></li>
    <li><span class="function"><a href="function.socket-strerror.php" class="function" rel="rdfs-seeAlso">socket_strerror()</a> - 返回描述套接字错误的字符串</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>