Differences From Artifact [e6b3708f36]:
- File
src/socket_helpers.h
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 2444) [annotate] [blame] [check-ins using]
To Artifact [3a4f887125]:
- File
src/socket_helpers.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: 2445) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
46 47 48 49 50 51 52 | #endif #ifndef INADDR_NONE # define INADDR_NONE ((in_addr_t)-1) #endif #ifndef SOMAXCONN | > > > > | < < < < < | 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 | #endif #ifndef INADDR_NONE # define INADDR_NONE ((in_addr_t)-1) #endif #ifndef SOMAXCONN /* * Use 16 as everything > 17 fails on Nintendo 3DS and 16 is a less arbitrary * number than 17. */ # define SOMAXCONN 16 #endif #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC 0 #endif #ifdef OF_WINDOWS # define close(sock) closesocket(sock) #endif #ifdef OF_WII # define accept(sock, addr, addrlen) net_accept(sock, addr, addrlen) # define bind(sock, addr, addrlen) net_bind(sock, addr, addrlen) # define close(sock) net_close(sock) # define connect(sock, addr, addrlen) net_connect(sock, addr, addrlen) # define gethostbyname(name) net_gethostbyname(name) # define h_errno 0 |
︙ | ︙ |