Improve enums
This commit is contained in:
3
sock.h
3
sock.h
@@ -21,7 +21,7 @@ extern "C" { // Prevent name mangling
|
|||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SOCK_ADDR_INVALID,
|
SOCK_ADDR_INVALID = 0,
|
||||||
SOCK_IPV4,
|
SOCK_IPV4,
|
||||||
SOCK_IPV6
|
SOCK_IPV6
|
||||||
} SockAddrType;
|
} SockAddrType;
|
||||||
@@ -39,6 +39,7 @@ typedef struct {
|
|||||||
} SockAddr;
|
} SockAddr;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
SOCK_TYPE_INVALID = 0,
|
||||||
SOCK_TCP,
|
SOCK_TCP,
|
||||||
SOCK_UDP
|
SOCK_UDP
|
||||||
} SockType;
|
} SockType;
|
||||||
|
|||||||
Reference in New Issue
Block a user