blob: 167bfa8ad183e0b848d2d226f631db20b05e366c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
//=============================================================================//
//
// Purpose: Net system utilities
//
//=============================================================================//
#include "pch.h"
#include "net.h"
//-----------------------------------------------------------------------------
// Purpose: returns the WSA error code
//-----------------------------------------------------------------------------
const char* NET_ErrorString(int iCode)
{
switch (iCode)
{
case WSAEINTR:
return "WSAEINTR";
case WSAEBADF:
return "WSAEBADF";
case WSAEACCES:
return "WSAEACCES";
case WSAEDISCON:
return "WSAEDISCON";
case WSAEFAULT:
return "WSAEFAULT";
case WSAEINVAL:
return "WSAEINVAL";
case WSAEMFILE:
return "WSAEMFILE";
case WSAEWOULDBLOCK:
return "WSAEWOULDBLOCK";
case WSAEINPROGRESS:
return "WSAEINPROGRESS";
case WSAEALREADY:
return "WSAEALREADY";
case WSAENOTSOCK:
return "WSAENOTSOCK";
case WSAEDESTADDRREQ:
return "WSAEDESTADDRREQ";
case WSAEMSGSIZE:
return "WSAEMSGSIZE";
case WSAEPROTOTYPE:
return "WSAEPROTOTYPE";
case WSAENOPROTOOPT:
return "WSAENOPROTOOPT";
case WSAEPROTONOSUPPORT:
return "WSAEPROTONOSUPPORT";
case WSAESOCKTNOSUPPORT:
return "WSAESOCKTNOSUPPORT";
case WSAEOPNOTSUPP:
return "WSAEOPNOTSUPP";
case WSAEPFNOSUPPORT:
return "WSAEPFNOSUPPORT";
case WSAEAFNOSUPPORT:
return "WSAEAFNOSUPPORT";
case WSAEADDRINUSE:
return "WSAEADDRINUSE";
case WSAEADDRNOTAVAIL:
return "WSAEADDRNOTAVAIL";
case WSAENETDOWN:
return "WSAENETDOWN";
case WSAENETUNREACH:
return "WSAENETUNREACH";
case WSAENETRESET:
return "WSAENETRESET";
case WSAECONNABORTED:
return "WSWSAECONNABORTEDAEINTR";
case WSAECONNRESET:
return "WSAECONNRESET";
case WSAENOBUFS:
return "WSAENOBUFS";
case WSAEISCONN:
return "WSAEISCONN";
case WSAENOTCONN:
return "WSAENOTCONN";
case WSAESHUTDOWN:
return "WSAESHUTDOWN";
case WSAETOOMANYREFS:
return "WSAETOOMANYREFS";
case WSAETIMEDOUT:
return "WSAETIMEDOUT";
case WSAECONNREFUSED:
return "WSAECONNREFUSED";
case WSAELOOP:
return "WSAELOOP";
case WSAENAMETOOLONG:
return "WSAENAMETOOLONG";
case WSAEHOSTDOWN:
return "WSAEHOSTDOWN";
case WSAEPROCLIM:
return "WSAEPROCLIM";
case WSASYSNOTREADY:
return "WSASYSNOTREADY";
case WSAVERNOTSUPPORTED:
return "WSAVERNOTSUPPORTED";
case WSANOTINITIALISED:
return "WSANOTINITIALISED";
case WSAHOST_NOT_FOUND:
return "WSAHOST_NOT_FOUND";
case WSATRY_AGAIN:
return "WSATRY_AGAIN";
case WSANO_RECOVERY:
return "WSANO_RECOVERY";
case WSANO_DATA:
return "WSANO_DATA";
default:
return "UNKNOWN ERROR";
}
}
|