Beispiel #1
0
int netlib_close(net_handle_t handle)
{
	CBaseSocket* pSocket = FindBaseSocket(handle);
	if (!pSocket)
		return NETLIB_ERROR;

	int ret = pSocket->Close();
	pSocket->ReleaseRef();
	return ret;
}
Beispiel #2
0
int netlib_close(net_handle_t handle)
{
	CBaseSocket* pSocket = FindBaseSocket(handle);
	if (!pSocket)
	{
		LOG__(APP, _T("can not find base socket,handle:%d"),handle);
		return NETLIB_ERROR;
	}

	int ret = pSocket->Close();
	pSocket->ReleaseRef();
	return ret;
}