| 1688 | bool NetClient::IsSessionTerminated() |
| 1689 | { |
| 1690 | enterSnd(); |
| 1691 | if (!channel) |
| 1692 | { |
| 1693 | leaveSnd(); |
| 1694 | return true; |
| 1695 | } |
| 1696 | // check NetChannel connectivity: |
| 1697 | if (!amIBot && channel->dropped()) |
| 1698 | { |
| 1699 | sessionTerminated = true; |
| 1700 | whySessionTerminated = NTRTimeout; |
| 1701 | } |
| 1702 | leaveSnd(); |
| 1703 | return sessionTerminated; |
| 1704 | } |
| 1705 | |
| 1706 | NetTerminationReason NetClient::GetWhySessionTerminated() |
| 1707 | { |
| 1708 | NetTerminationReason reason; |
| 1709 | enterSnd(); |
| 1710 | reason = whySessionTerminated; |
| 1711 | |
| 1712 | leaveSnd(); |
| 1713 | return reason; |
| 1714 | } |
| 1715 | |
| 1716 | void NetClient::ProcessUserMessages(UserMessageClientCallback* callback, void* context) |
| 1717 | { |
| 1718 | if (!callback) |
| 1719 | { |
| 1720 | return; |
| 1721 | } |
| 1722 | Ref<NetMessage> msg; |
| 1723 | enterRcv(); |
| 1724 | #ifdef NET_LOG_CLIENT_PROCESS |
| 1725 | int n = 0; |
| 1726 | msg = received; |
| 1727 | while (msg) |
| 1728 | { |
| 1729 | n++; |
| 1730 | msg = msg->next; |
| 1731 | } |
no test coverage detected