<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.socket-shutdown.php',
    1 => 'socket_shutdown',
    2 => '&Eacute;teint un socket en lecture et/ou &eacute;criture',
  ),
  'up' => 
  array (
    0 => 'ref.sockets.php',
    1 => 'Fonctions sur les sockets',
  ),
  'prev' => 
  array (
    0 => 'function.socket-setopt.php',
    1 => 'socket_setopt',
  ),
  'next' => 
  array (
    0 => 'function.socket-strerror.php',
    1 => 'socket_strerror',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/sockets/functions/socket-shutdown.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.socket-shutdown" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">socket_shutdown</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">socket_shutdown</span> &mdash; <span class="dc-title">Éteint un socket en lecture et/ou écriture</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.socket-shutdown-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>socket_shutdown</strong></span>(<span class="methodparam"><span class="type"><a href="class.socket.php" class="type Socket">Socket</a></span> <code class="parameter">$socket</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code><span class="initializer"> = 2</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>socket_shutdown()</strong></span> permet d&#039;empêcher les données
   entrantes ou sortantes ou les deux (par défaut) d&#039;être émises via
   le socket <code class="parameter">socket</code>.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Le ou les buffers associés peuvent, ou peuvent ne pas être vidés.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.socket-shutdown-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">socket</code></dt>
     <dd>
      <p class="para">
       Une instance de <span class="classname"><a href="class.socket.php" class="classname">Socket</a></span> créée par <span class="function"><a href="function.socket-create.php" class="function">socket_create()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       La valeur du paramètre <code class="parameter">mode</code> peut être une
       des valeurs suivantes :
       <table class="doctable table">
        <caption><strong>Valeurs possibles pour <code class="parameter">mode</code></strong></caption>
        
         <tbody class="tbody">
          <tr>
           <td><code class="literal">0</code></td>
           <td>
            Empêche la lecture du socket
           </td>
          </tr>

          <tr>
           <td><code class="literal">1</code></td>
           <td>
            Empêche l&#039;écriture du socket
           </td>
          </tr>

          <tr>
           <td><code class="literal">2</code></td>
           <td>
            Empêche l&#039;écriture et la lecture du socket
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.socket-shutdown-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Cette fonction retourne <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en cas de succès ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.socket-shutdown-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">socket</code> est désormais une instance de <span class="classname"><a href="class.socket.php" class="classname">Socket</a></span> ;
  auparavant, c&#039;était une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

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