[#CNode-m_sock]
= xref:CNode.adoc[CNode]::m&lowbar;sock
:relfileprefix: ../
:mrdocs:

Socket used for communication with the node&period; May not own a Sock object (after `CloseSocketDisconnect()` or during tests)&period; `shared&lowbar;ptr` (instead of `unique&lowbar;ptr`) is used to avoid premature close of the underlying file descriptor by one thread while another thread is poll(2)&hyphen;ing it for activity&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;guarded&lowbar;by(0x7f2e2b2a7a18), guarded&lowbar;by(0x7f2e2ad13168), guarded&lowbar;by(0x7f2e230317c8), guarded&lowbar;by(0x7f2e26ede398), guarded&lowbar;by(0x7f2e23157a18), guarded&lowbar;by(0x7f2e36827298), guarded&lowbar;by(0x7f2e228af9b8), guarded&lowbar;by(0x7f2e431dc778), guarded&lowbar;by(0x7f2e1b9fba48), guarded&lowbar;by(0x7f2e2b9cf5e8), guarded&lowbar;by(0x7f2e403d1ce8)&rsqb;&rsqb;
std::shared&lowbar;ptr&lt;Sock&gt; m&lowbar;sock;
----

== See Also

https&colon;&sol;&sol;github&period;com&sol;bitcoin&sol;bitcoin&sol;issues&sol;21744 for details&period;


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