| 716 | } |
| 717 | |
| 718 | IMtConnection* ConnectionMgr::GetConnection(CONN_OBJ_TYPE type, struct sockaddr_in* dst) |
| 719 | { |
| 720 | switch (type) |
| 721 | { |
| 722 | case OBJ_SHORT_CONN: |
| 723 | return _udp_short_queue.AllocPtr(); |
| 724 | break; |
| 725 | |
| 726 | case OBJ_TCP_KEEP: |
| 727 | return _tcp_keep_mgr.GetTcpKeepConn(dst); |
| 728 | break; |
| 729 | |
| 730 | case OBJ_UDP_SESSION: |
| 731 | return _udp_session_queue.AllocPtr(); |
| 732 | break; |
| 733 | |
| 734 | default: |
| 735 | return NULL; |
| 736 | break; |
| 737 | } |
| 738 | |
| 739 | } |
| 740 | |
| 741 | void ConnectionMgr::FreeConnection(IMtConnection* conn, bool force_free) |
| 742 | { |
no test coverage detected