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