[#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(0x7f950f15d3d8), guarded&lowbar;by(0x7f950f1ec6e8), guarded&lowbar;by(0x7f950afefdc8), guarded&lowbar;by(0x7f9503032cc8), guarded&lowbar;by(0x7f95236c1778), guarded&lowbar;by(0x7f952527aee8), guarded&lowbar;by(0x7f950ec80538), guarded&lowbar;by(0x7f950dc33d68), guarded&lowbar;by(0x7f951df8f908), guarded&lowbar;by(0x7f9524e493a8), guarded&lowbar;by(0x7f950f723648)&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]#
