[#CNode-m_sock] = xref:CNode.adoc[CNode]::m_sock :relfileprefix: ../ :mrdocs: Socket used for communication with the node. May not own a Sock object (after `CloseSocketDisconnect()` or during tests). `shared_ptr` (instead of `unique_ptr`) is used to avoid premature close of the underlying file descriptor by one thread while another thread is poll(2)‐ing it for activity. == Synopsis Declared in `<net.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[guarded_by(0x7fb96f08ddc8), guarded_by(0x7fb96f19d1e8), guarded_by(0x7fb96713b498), guarded_by(0x7fb96b052ad8), guarded_by(0x7fb95ed2b6f8), guarded_by(0x7fb96c8ad798), guarded_by(0x7fb95fd99f58), guarded_by(0x7fb94c275818), guarded_by(0x7fb966e24908), guarded_by(0x7fb97a56bc48), guarded_by(0x7fb96e77de08)]] std::shared_ptr<Sock> m_sock; ---- == See Also https://github.com/bitcoin/bitcoin/issues/21744 for details. [.small]#Created with https://www.mrdocs.com[MrDocs]#