libcsdbg  1.28
C++ exception (and generic) stack trace debug library
tcpsockbuf & csdbg::tcpsockbuf::shutdown ( i32  ch) const

Shutdown one or both socket channels.

[in]chthe channel(s) to shutdown
If the object implements LDP, that is a unidirectional protocol, the read channel can be shutdown right after connection establishment

Definition at line 299 of file tcpsockbuf.cpp.

References likely, and csdbg::streambuf::m_handle.

300 {
301  if ( likely(m_handle >= 0) )
302  ::shutdown(m_handle, ch);
304  return const_cast<tcpsockbuf&> (*this);
305 }
tcpsockbuf(const i8 *, i32=g_ldp_port)
Object constructor.
Definition: tcpsockbuf.cpp:24
i32 m_handle
Stream handle (descriptor)
Definition: streambuf.hpp:43
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
Definition: config.hpp:344
virtual tcpsockbuf & shutdown(i32) const
Shutdown one or both socket channels.
Definition: tcpsockbuf.cpp:299