---------------------------------------------------------------------------
| 601 | } |
| 602 | //--------------------------------------------------------------------------- |
| 603 | AnsiString TUDP::GetErrorMessageEng(void) |
| 604 | { |
| 605 | switch( WSAError ) |
| 606 | { |
| 607 | case 0: return ""; |
| 608 | case WSAEADDRINUSE: return "Address or port is already in use"; |
| 609 | case WSAENETDOWN: return "Network died"; |
| 610 | case WSAENETUNREACH: return "Network is not available"; |
| 611 | case WSAECONNABORTED: return "Connection closed because of an error"; |
| 612 | case WSAECONNRESET: return "Connection closed by remote side"; |
| 613 | case WSAENOBUFS: return "Network buffer overflow"; |
| 614 | case WSAESHUTDOWN: return "The exchange is not possible - the connection is closed"; |
| 615 | case WSAETIMEDOUT: return "Timeout connecting over TCP/IP"; |
| 616 | case WSAECONNREFUSED: return "The remote host refused the connection"; |
| 617 | case WSAEHOSTDOWN: return "The remote host does not exist"; |
| 618 | case WSAHOST_NOT_FOUND: return "Host Name not found"; |
| 619 | case WSAENOTSOCK: return "Invalid socket identification"; |
| 620 | case WSAEWOULDBLOCK: return "Non-blocking operation is in progress"; |
| 621 | case WSANO_DATA: return "Can not get IP address for the host name"; |
| 622 | // WSAEHOSTUNREACH occurs when the Ethernet cable is off and there is no WiFi |
| 623 | case WSAEHOSTUNREACH: return "Network not available"; // "Host not available"; |
| 624 | case WSAEMSGSIZE: return "Message too large"; |
| 625 | // Local error codes |
| 626 | case MYERROR_UNKNOWNPARAMS: return "Invalid parameters"; |
| 627 | case MYERROR_READCOUNT: return "to the receive buffer still have UDP packets"; |
| 628 | case MYERROR_NOREQSIZE: return "to the receive buffer data is less than requested"; |
| 629 | } |
| 630 | return AnsiString ("Error code: ") + IntToStr(WSAError); |
| 631 | } |
| 632 | //--------------------------------------------------------------------------- |
| 633 |
no outgoing calls
no test coverage detected