[#i2p-sam-Session]
= xref:i2p.adoc[i2p]::xref:i2p/sam.adoc[sam]::Session
:relfileprefix: ../../
:mrdocs:

I2P SAM session&period;

== Synopsis

Declared in `&lt;i2p&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Session;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:i2p/sam/Session/2constructor-03.adoc[`Session`]         [.small]#[constructor]#
| Constructors
| xref:i2p/sam/Session/2destructor.adoc[`&#126;Session`] [.small]#[destructor]#
| Destroy the session, closing the internally used sockets&period; The sockets that have been returned by `Accept()` or `Connect()` will not be closed, but they will be closed by the SAM proxy because the session is destroyed&period; So they will return an error next time we try to read or write to them&period;
| xref:i2p/sam/Session/Accept.adoc[`Accept`] 
| Wait for and accept a new incoming connection&period;
| xref:i2p/sam/Session/Connect.adoc[`Connect`] 
| Connect to an I2P peer&period;
| xref:i2p/sam/Session/Listen.adoc[`Listen`] 
| Start listening for an incoming connection&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
