Implement UdpSocketImpl::Close ()
This commit is contained in:
@@ -203,9 +203,16 @@ UdpSocketImpl::ShutdownRecv (void)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -184,6 +184,7 @@ public:
|
||||
|
||||
/**
|
||||
* \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.
|
||||
|
||||
Reference in New Issue
Block a user