Bugzilla – Attachment #542: proposed patch for bug #649
}
int
UdpSocketImpl::Close(void)
UdpSocketImpl::Close (void)
{
NS_LOG_FUNCTION_NOARGS ();
if (m_shutdownRecv == true && m_shutdownSend == true)
m_errno = Socket::ERROR_BADF;
return -1;
m_shutdownRecv = true;
m_shutdownSend = true;
return 0;
/**
* \brief Close a socket.
* \returns zero on success, -1 on failure.
*
* After the Close call, the socket is no longer valid, and cannot
* safely be used for subsequent operations.