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>

[[guarded_by(0x7fd74af15d48), guarded_by(0x7fd74b2fcea8), guarded_by(0x7fd75704d058), guarded_by(0x7fd74f008968), guarded_by(0x7fd7528ba598), guarded_by(0x7fd749ae4648), guarded_by(0x7fd75fdcc288), guarded_by(0x7fd761002c08), guarded_by(0x7fd756d23678), guarded_by(0x7fd75b027f28), guarded_by(0x7fd762a3a438)]]
std::shared_ptr<Sock> m_sock;

See Also

https://github.com/bitcoin/bitcoin/issues/21744 for details.

Created with MrDocs