ObjFW  Diff

Differences From Artifact [f7e5adc4a8]:

To Artifact [854e84e0a1]:

  • File src/socket.h — part of check-in [12b8a7552e] at 2016-03-27 23:10:53 on branch trunk — Add socket support for Nintendo 3DS

    This removes the port registry that existed for the Wii and instead
    tries binding to random ports in a loop until it succeeds or errno is
    not EADDRINUSE. This is done for the Wii and Nintendo 3DS now.

    This also includes several other socket-related cleanups. (user: js, size: 1868) [annotate] [blame] [check-ins using]


83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
extern "C" {
#endif
extern bool of_socket_init(void);
extern int of_socket_errno(void);
# ifndef OF_WII
extern int of_getsockname(of_socket_t socket, struct sockaddr *restrict address,
    socklen_t *restrict address_len);
# else
extern bool of_socket_port_register(uint16_t port, int type);
extern void of_socket_port_free(uint16_t port, int type);
extern uint16_t of_socket_port_find(int type);
# endif
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







<
<
<
<






83
84
85
86
87
88
89




90
91
92
93
94
95
extern "C" {
#endif
extern bool of_socket_init(void);
extern int of_socket_errno(void);
# ifndef OF_WII
extern int of_getsockname(of_socket_t socket, struct sockaddr *restrict address,
    socklen_t *restrict address_len);




# endif
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END