Skip to content

Commit c9a7430

Browse files
committed
py/mperrno: Add some more MP_Exxx constants, related to networking.
1 parent bc04dc2 commit c9a7430

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

py/mperrno.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,18 @@
6666
#define MP_EPIPE (32) // Broken pipe
6767
#define MP_EDOM (33) // Math argument out of domain of func
6868
#define MP_ERANGE (34) // Math result not representable
69+
#define MP_EWOULDBLOCK MP_EAGAIN // Operation would block
70+
#define MP_EOPNOTSUPP (95) // Operation not supported on transport endpoint
6971
#define MP_EAFNOSUPPORT (97) // Address family not supported by protocol
72+
#define MP_EADDRINUSE (98) // Address already in use
73+
#define MP_ECONNABORTED (103) // Software caused connection abort
74+
#define MP_ECONNRESET (104) // Connection reset by peer
75+
#define MP_ENOBUFS (105) // No buffer space available
7076
#define MP_ENOTCONN (107) // Transport endpoint is not connected
7177
#define MP_ETIMEDOUT (110) // Connection timed out
78+
#define MP_EHOSTUNREACH (113) // No route to host
79+
#define MP_EALREADY (114) // Operation already in progress
80+
#define MP_EINPROGRESS (115) // Operation now in progress
7281

7382
#else
7483

@@ -110,9 +119,18 @@
110119
#define MP_EPIPE EPIPE
111120
#define MP_EDOM EDOM
112121
#define MP_ERANGE ERANGE
122+
#define MP_EWOULDBLOCK EAGAIN
123+
#define MP_EOPNOTSUPP EOPNOTSUPP
113124
#define MP_EAFNOSUPPORT EAFNOSUPPORT
125+
#define MP_EADDRINUSE EADDRINUSE
126+
#define MP_ECONNABORTED ECONNABORTED
127+
#define MP_ECONNRESET ECONNRESET
128+
#define MP_ENOBUFS ENOBUFS
114129
#define MP_ENOTCONN ENOTCONN
115130
#define MP_ETIMEDOUT ETIMEDOUT
131+
#define MP_EHOSTUNREACH EHOSTUNREACH
132+
#define MP_EALREADY EALREADY
133+
#define MP_EINPROGRESS EINPROGRESS
116134

117135
#endif
118136

0 commit comments

Comments
 (0)