sprint 1-alpha
sprint/io/network/sockerr.h
00001 #ifndef _SPRINT_SOCKERR_H
00002 #define _SPRINT_SOCKERR_H
00003 
00004 // used internally 
00005 #include <sprint/sysdef.h>
00006 
00007 struct socket_error {
00008         UINT error;
00009         LPCSTR lpszError;
00010 };
00011 
00012 #ifdef LINUX
00013 static struct socket_error error_list[]={
00014   {EPROTONOSUPPORT,"The  protocol  type  or  the specified protocol is not supported within this domain"},
00015         {0,NULL}};
00016 #elif defined (WIN32)  
00017 static struct socket_error error_list[]={
00018         {WSAEACCES, "Permission denied"},
00019         {WSAEADDRINUSE, "Address already in use"},
00020         {WSAEADDRNOTAVAIL, "Cannot assign requested address"},
00021         {WSAEALREADY, "Operation already in progress"},
00022         {WSAECONNABORTED, "Software caused connection abort."},
00023         {WSAECONNREFUSED, "Connection refused"},
00024         {WSAECONNRESET, "Connection reset by peer."},   
00025         {WSAEDESTADDRREQ, "Destination address required."},
00026         {WSAEFAULT, "Bad address"},
00027         {WSAEISCONN, "Socket is already connected."},
00028         {WSAEINPROGRESS, "Operation now in progress."},
00029         {WSAEINTR, "Interrupted function call."},
00030         {WSAEHOSTUNREACH, "No route to host"},
00031         {WSAENOTSOCK, "Socket operation on non-socket."},
00032         {WSAENOTCONN, "Socket is not connected."},
00033         {WSAEMSGSIZE, "Message too long"}, 
00034         {WSAENOPROTOOPT, "Unknown, invalid or unsupported option"},
00035         {WSAENOPROTOOPT, "Unknown, invalid or unsupported option"},
00036         {WSAENOBUFS, "No buffer space available"},
00037         {WSAEPROTOTYPE, "Protocol wrong type for socket"},
00038         {WSAEWOULDBLOCK, "Resource temporarily unavailable."},
00039         {WSAETIMEDOUT, "Connection timed out."},
00040         {WSAHOST_NOT_FOUND, "Host not found"},
00041         {WSANOTINITIALISED, "WinSocket not Initialized (Sei un Cretino)"},
00042         {WSANO_DATA, "Valid name, no data record of requested type."},
00043         {WSAEINVAL, "Invalid Socket"},
00044         {0,NULL}};
00045 #endif
00046 
00047 
00048 
00049 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines