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