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>

std::shared_ptr<Sock> m_sock;

See Also

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

Created with MrDocs