Fills in the string with the string address from the internet address
| 836 | |
| 837 | // Fills in the string with the string address from the internet address |
| 838 | void nw_GetNumbersFromHostAddress(network_address *address, char *str) { |
| 839 | // ASSERT(NetworkProtocol==NP_TCP); |
| 840 | ASSERT(str); |
| 841 | struct in_addr addr; |
| 842 | |
| 843 | if (address->connection_type == NP_TCP) { |
| 844 | memcpy(&addr, address->address, sizeof(struct in_addr)); |
| 845 | sprintf(str, "IP: %s:%d", inet_ntoa(addr), address->port); |
| 846 | } |
| 847 | |
| 848 | #ifdef WIN32 |
| 849 | else if (Use_DirectPlay && (address->connection_type == NP_DIRECTPLAY)) { |
| 850 | DPID id; |
| 851 | memcpy(&id, address->address, sizeof(DPID)); |
| 852 | sprintf(str, "DirectPlay: 0x%x", id); |
| 853 | } |
| 854 | #endif |
| 855 | } |
| 856 | |
| 857 | #define CLOSE_TIMEOUT_TIME 3 // 3 seconds |
| 858 |
no outgoing calls
no test coverage detected