    CRITICAL_REGION_BEGIN(m_send_lock);    LOG_PRINT_L0("[" << m_socket <<"] SEND " << sizeof(head));    int res = ::send(m_socket, (const char*)&head, sizeof(head), 0);    if(SOCKET_ERROR == res)    {     int err = ::WSAGetLastError();     LOG_ERROR("Failed to send(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\"");     disconnect();     return LEVIN_ERROR_CONNECTION_DESTROYED;    }    LOG_PRINT_L0("[" << m_socket <<"] SEND " << (int)in_buff.size());    res = ::send(m_socket, in_buff.data(), (int)in_buff.size(), 0);    if(SOCKET_ERROR == res)    {     int err = ::WSAGetLastError();     LOG_ERROR("Failed to send(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\"");     disconnect();     return LEVIN_ERROR_CONNECTION_DESTROYED;    }    CRITICAL_REGION_END();    LOG_PRINT_L0("LEVIN_PACKET_SENT. [len=" << head.m_cb << ", flags=" << head.m_flags << ", is_cmd=" << head.m_have_to_return_data <<", cmd_id = " << head.m_command << ", pr_v=" << head.m_protocol_version << ", uid=" << string_tools::get_str_from_guid_a(head.m_id) << "]");     