[#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(0x7ff36f2e01f8), guarded_by(0x7ff36e4bca28), guarded_by(0x7ff37ef681e8), guarded_by(0x7ff3770c4ea8), guarded_by(0x7ff38f6281b8), guarded_by(0x7ff37eb78b58), guarded_by(0x7ff37bc1b208), guarded_by(0x7ff38919b818), guarded_by(0x7ff37a03c058), guarded_by(0x7ff383afd448), guarded_by(0x7ff37ca25a28)]] 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]#