[#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(0x7f2e2b2a7a18), guarded_by(0x7f2e2ad13168), guarded_by(0x7f2e230317c8), guarded_by(0x7f2e26ede398), guarded_by(0x7f2e23157a18), guarded_by(0x7f2e36827298), guarded_by(0x7f2e228af9b8), guarded_by(0x7f2e431dc778), guarded_by(0x7f2e1b9fba48), guarded_by(0x7f2e2b9cf5e8), guarded_by(0x7f2e403d1ce8)]] 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]#