[#i2p-sam-Session] = xref:i2p.adoc[i2p]::xref:i2p/sam.adoc[sam]::Session :relfileprefix: ../../ :mrdocs: I2P SAM session. == Synopsis Declared in `<i2p.h>` [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[`~Session`] [.small]#[destructor]# | Destroy the session, closing the internally used sockets. 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. So they will return an error next time we try to read or write to them. | xref:i2p/sam/Session/Accept.adoc[`Accept`] | Wait for and accept a new incoming connection. | xref:i2p/sam/Session/Connect.adoc[`Connect`] | Connect to an I2P peer. | xref:i2p/sam/Session/Listen.adoc[`Listen`] | Start listening for an incoming connection. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#