Differences From 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]
To Artifact [ae4292ecac]:
- File
src/socket_helpers.h
— part of check-in
[543eb96c02]
at
2016-03-28 23:43:39
on branch trunk
— Style consistency changes
Multiline preprocessor directives now always indent the continued lines
by 4 spaces. The only exception are defines that define to code blocks:
Those are still indented by a tab in order to align with the rest of the
code. (user: js, size: 2454) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
73 74 75 76 77 78 79 | # define gethostbyname(name) net_gethostbyname(name) # define h_errno 0 # define hstrerror(err) "unknown (no hstrerror)" # define listen(sock, backlog) net_listen(sock, backlog) # define poll(fds, nfds, timeout) net_poll(fds, nfds, timeout) # define recv(sock, buf, len, flags) net_recv(sock, buf, len, flags) # define recvfrom(sock, buf, len, flags, addr, addrlen) \ | | | | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | # define gethostbyname(name) net_gethostbyname(name) # define h_errno 0 # define hstrerror(err) "unknown (no hstrerror)" # define listen(sock, backlog) net_listen(sock, backlog) # define poll(fds, nfds, timeout) net_poll(fds, nfds, timeout) # define recv(sock, buf, len, flags) net_recv(sock, buf, len, flags) # define recvfrom(sock, buf, len, flags, addr, addrlen) \ net_recvfrom(sock, buf, len, flags, addr, addrlen) # define send(sock, buf, len, flags) net_send(sock, buf, len, flags) # define sendto(sock, buf, len, flags, addr, addrlen) \ net_sendto(sock, buf, len, flags, addr, addrlen) # define setsockopt(sock, level, name, value, len) \ net_setsockopt(sock, level, name, value, len) # define socket(domain, type, proto) net_socket(domain, type, proto) typedef u32 in_addr_t; typedef u32 nfds_t; #endif |