MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / GetErrorMessageEng

Method GetErrorMessageEng

sourcecommon/tcpserv.cpp:186–215  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

184}
185//---------------------------------------------------------------------------
186AnsiString MSocket::GetErrorMessageEng(void)
187{
188 switch( errcode )
189 {
190 case 0: return "";
191 case WSAEADDRINUSE: return "Address or port is already in use";
192 case WSAENETDOWN: return "Network died";
193 case WSAENETUNREACH: return "Network is not available";
194 case WSAECONNABORTED: return "Connection closed because of an error";
195 case WSAECONNRESET: return "Connection closed by remote side";
196 case WSAENOBUFS: return "Network buffer overflow";
197 case WSAESHUTDOWN: return "The exchange is not possible - the connection is closed";
198 case WSAETIMEDOUT: return "Timeout connecting over TCP/IP";
199 case WSAECONNREFUSED: return "The remote host refused the connection";
200 case WSAEHOSTDOWN: return "The remote host does not exist";
201 case WSAHOST_NOT_FOUND: return "Host Name not found";
202 case WSAENOTSOCK: return "Invalid socket identification";
203 case WSAEWOULDBLOCK: return "Non-blocking operation is in progress";
204 case WSANO_DATA: return "Can not get IP address for the host name";
205 // WSAEHOSTUNREACH occurs when the Ethernet cable is off and there is no WiFi
206 case WSAEHOSTUNREACH: return "Network not available"; // "Host not available";
207 case WSAEMSGSIZE: return "Message too large";
208 /* Local error codes
209 case MYERROR_UNKNOWNPARAMS: return "Invalid parameters";
210 case MYERROR_READCOUNT: return "to the receive buffer still have UDP packets";
211 case MYERROR_NOREQSIZE: return "to the receive buffer data is less than requested";
212 */
213 }
214 return AnsiString ("Error code: ") + IntToStr(errcode);
215}
216//---------------------------------------------------------------------------
217/*
218bool MSocket::WriteTo(void * data, int size, struct sockaddr * p)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected