<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.socket-set-option.php',
    1 => 'socket_set_option',
    2 => 'Valorizza le opzioni per un socket',
  ),
  'up' => 
  array (
    0 => 'ref.sockets.php',
    1 => 'Socket Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.socket-set-nonblock.php',
    1 => 'socket_set_nonblock',
  ),
  'next' => 
  array (
    0 => 'function.socket-setopt.php',
    1 => 'socket_setopt',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/sockets/functions/socket-set-option.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.socket-set-option" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">socket_set_option</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">socket_set_option</span> &mdash; <span class="dc-title">Valorizza le opzioni per un socket</span></p>

   </div>
   <div class="refsect1 unknown-1174" id="refsect1-function.socket-set-option-unknown-1174">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>socket_set_option</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$socket</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$level</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$optname</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$optval</code></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

     <div class="warning"><strong class="warning">Avviso</strong><p class="simpara">Questa funzione è
<em>SPERIMENTALE</em>. Ovvero, il comportamento di questa funzione,
il nome di questa funzione, in definitiva tutto ciò che è documentato qui 
può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l&#039;uso di questa
funzione è a vostro rischio.</p></div>
    <p class="para">
     La funzione <span class="function"><strong>socket_set_option()</strong></span> imposta l&#039;opzione specificata dal parametro <code class="parameter">optname</code>,
     per il livello di protocollo indicato da <code class="parameter">level</code> sul socket indicato da 
     <code class="parameter">socket</code>, al valore indicato dal parametro <code class="parameter">optval</code>.
     La funzione <span class="function"><strong>socket_set_option()</strong></span> restituisce <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> se si verifica un errore.
    </p> 
    <p class="para"> 
     Il parametro <code class="parameter">level</code> indica il livello di protocollo
     nel quale si trova l&#039;opzione. Ad esempio, per ageire sulle opzioni a livello di socket,
     occorre impostare il parametro <code class="parameter">level</code> a SOL_SOCKET. Si possono utlizzare livelli,
     tipo TCP, semplicemente impostando il valore di protocollo nel parametro <code class="parameter">level</code>.
     I valori previsti possono essere recuperati tramite la funzione <span class="function"><a href="function.getprotobyname.php" class="function">getprotobyname()</a></span>.
    </p> 
    <p class="para"> 
     Le oopzioni disponibili per i socket sono le medesime indicate per la funzione <span class="function"><a href="function.socket-get-option.php" class="function">socket_get_option()</a></span>.
    </p>
    <blockquote class="note"><p><strong class="note">Nota</strong>: 
     <p class="para">
      Nelle versioni di PHP antecedenti la 4.3.0, questa funzione 
      era chiamata <code class="literal">socket_setopt()</code>.
     </p>
    </p></blockquote>
   </div>

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