Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1372

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- ssl</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/ssl-5.1.2.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Secure Socket Layer </strong><br><strong>Reference Manual</strong><br><small>Version 5.1.2</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li title="ssl (App)"><a href="ssl_app.html">ssl (App)
                </a></li>
<li id="no" title="ssl " expanded="false">ssl<ul>
<li><a href="ssl.html">
                  Top of manual page
                </a></li>
<li title="cipher_suites-0"><a href="ssl.html#cipher_suites-0">cipher_suites/0</a></li>
<li title="cipher_suites-1"><a href="ssl.html#cipher_suites-1">cipher_suites/1</a></li>
<li title="connect-2"><a href="ssl.html#connect-2">connect/2</a></li>
<li title="connect-3"><a href="ssl.html#connect-3">connect/3</a></li>
<li title="connect-3"><a href="ssl.html#connect-3">connect/3</a></li>
<li title="connect-4"><a href="ssl.html#connect-4">connect/4</a></li>
<li title="close-1"><a href="ssl.html#close-1">close/1</a></li>
<li title="controlling_process-2"><a href="ssl.html#controlling_process-2">controlling_process/2</a></li>
<li title="connection_info-1"><a href="ssl.html#connection_info-1">connection_info/1</a></li>
<li title="format_error-1"><a href="ssl.html#format_error-1">format_error/1</a></li>
<li title="getopts-2"><a href="ssl.html#getopts-2">getopts/2</a></li>
<li title="listen-2"><a href="ssl.html#listen-2">listen/2</a></li>
<li title="peercert-1"><a href="ssl.html#peercert-1">peercert/1</a></li>
<li title="peername-1"><a href="ssl.html#peername-1">peername/1</a></li>
<li title="recv-2"><a href="ssl.html#recv-2">recv/2</a></li>
<li title="recv-3"><a href="ssl.html#recv-3">recv/3</a></li>
<li title="prf-5"><a href="ssl.html#prf-5">prf/5</a></li>
<li title="renegotiate-1"><a href="ssl.html#renegotiate-1">renegotiate/1</a></li>
<li title="send-2"><a href="ssl.html#send-2">send/2</a></li>
<li title="setopts-2"><a href="ssl.html#setopts-2">setopts/2</a></li>
<li title="shutdown-2"><a href="ssl.html#shutdown-2">shutdown/2</a></li>
<li title="ssl_accept-1"><a href="ssl.html#ssl_accept-1">ssl_accept/1</a></li>
<li title="ssl_accept-2"><a href="ssl.html#ssl_accept-2">ssl_accept/2</a></li>
<li title="ssl_accept-2"><a href="ssl.html#ssl_accept-2">ssl_accept/2</a></li>
<li title="ssl_accept-3"><a href="ssl.html#ssl_accept-3">ssl_accept/3</a></li>
<li title="sockname-1"><a href="ssl.html#sockname-1">sockname/1</a></li>
<li title="start-0"><a href="ssl.html#start-0">start/0</a></li>
<li title="start-1"><a href="ssl.html#start-1">start/1</a></li>
<li title="stop-0"><a href="ssl.html#stop-0">stop/0</a></li>
<li title="transport_accept-1"><a href="ssl.html#transport_accept-1">transport_accept/1</a></li>
<li title="transport_accept-2"><a href="ssl.html#transport_accept-2">transport_accept/2</a></li>
<li title="versions-0"><a href="ssl.html#versions-0">versions/0</a></li>
</ul>
</li>
<li id="loadscrollpos" title="ssl_session_cache_api " expanded="true">ssl_session_cache_api<ul>
<li><a href="ssl_session_cache_api.html">
                  Top of manual page
                </a></li>
<li title="delete-2"><a href="ssl_session_cache_api.html#delete-2">delete/2</a></li>
<li title="foldl-3"><a href="ssl_session_cache_api.html#foldl-3">foldl/3</a></li>
<li title="init-0"><a href="ssl_session_cache_api.html#init-0">init/0</a></li>
<li title="lookup-2"><a href="ssl_session_cache_api.html#lookup-2">lookup/2</a></li>
<li title="select_session-2"><a href="ssl_session_cache_api.html#select_session-2">select_session/2</a></li>
<li title="terminate-1"><a href="ssl_session_cache_api.html#terminate-1">terminate/1</a></li>
<li title="update-3"><a href="ssl_session_cache_api.html#update-3">update/3</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>ssl_session_cache_api</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">ssl_session_cache_api</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">Defines the API for the TLS session cache so
    that the data storage scheme can be replaced by
    defining a new callback module implementing this API.</div>

  <h3><a name="id63150">Common Data Types</a></h3>
<div class="REFBODY">
    

    <p>The following data types are used in the functions below:
    </p>

    <p><span class="code">cache_ref() = opaque()</span></p> 
    
    <p><span class="code">key() = {partialkey(), session_id()}</span></p>
    
    <p><span class="code">partialkey() = opaque()</span></p>
    
    <p><span class="code">session_id() = binary()</span></p>

    <p><span class="code">session() = opaque()</span></p>
    
  </div>
  
  <h3>EXPORTS</h3>   

    <p><a name="delete-2"><span class="bold_code">delete(Cache, Key) -&gt; _</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code"> Cache = cache_ref()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Key  = key()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p> Deletes a cache entry. Will only be called from the cache
	handling process.
	</p>
      </p></div>

    <p><a name="foldl-3"><span class="bold_code">foldl(Fun, Acc0, Cache) -&gt; Acc</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code"></span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Calls Fun(Elem, AccIn) on successive elements of the
	cache, starting with AccIn == Acc0. Fun/2 must return a new
	accumulator which is passed to the next call. The function returns
	the final value of the accumulator. Acc0 is returned if the cache is
	empty. 
	</p>
      </p></div>

    <p><a name="init-0"><span class="bold_code">init() -&gt; opaque() </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code"></span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Performs possible initializations of the cache and returns
	a reference to it that will be used as parameter to the other
	api functions. Will be called by the cache handling processes
	init function, hence putting the same requirements on it as
	a normal process init function.
	</p>
      </p></div>

    <p><a name="lookup-2"><span class="bold_code">lookup(Cache, Key) -&gt; Entry</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code"> Cache = cache_ref()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Key  = key()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Entry = session() | undefined </span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Looks up a cache entry. Should be callable from any
         process.
         </p>
      </p></div>
    
    <p><a name="select_session-2"><span class="bold_code">select_session(Cache, PartialKey) -&gt; [session()]</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code"> Cache = cache_ref()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> PartialKey = partialkey()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Session = session()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Selects sessions that could be reused. Should be callable
	from any process.
	</p>
      </p></div>

    <p><a name="terminate-1"><span class="bold_code">terminate(Cache) -&gt; _</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">Cache = term()  - as returned by init/0</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Takes care of possible cleanup that is needed when the
	cache handling process terminates.
	</p>
      </p></div>

    <p><a name="update-3"><span class="bold_code">update(Cache, Key, Session) -&gt; _</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code"> Cache = cache_ref()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Key  = key()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code"> Session = session()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p> Caches a new session or updates a already cached one. Will
	only be called from the cache handling process.
	</p>
      </p></div>
    
   
  
</div>
<div class="footer">
<hr>
<p>Copyright © 1999-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>