aboutsummaryrefslogtreecommitdiff
path: root/src/target.cpp
diff options
context:
space:
mode:
authorJonathan Marler <jonathan.j.marler@hp.com>2019-10-21 14:26:15 -0600
committerAndrew Kelley <andrew@ziglang.org>2019-10-21 23:12:35 -0400
commit87b11617b55254abab267e8739ee2f0d926fbcf5 (patch)
tree8677ff7d47b1140d05e5bcff8723ccbc175b0341 /src/target.cpp
parent2550cb4638e12e94073cbca5c0ee3aa263c25dbe (diff)
downloadzig-87b11617b55254abab267e8739ee2f0d926fbcf5.tar.gz
zig-87b11617b55254abab267e8739ee2f0d926fbcf5.zip
Fix accept function API
The sockaddr pointer and size of the accept function points to a data structure that can only be determined at runtime. The only requirement is that it must be large enough to hold 2 bytes for the address family value. Typeical usage of the socket API is for UDP/TCP IPv4 and IPv6 sockets, which use sockaddr_in and sockaddr_in6. And some sockets can actually support both simultaneously in which case the app may want to have access to the size of the returned sockaddr. Operating systems can even support custom protocols where they use custom sockaddr data structures. In this case the standard library would have no knowledge of the actual size of the sockaddr being passed into the accept function. In this case the standard library should defer to the app to pass in the size of their structure.
Diffstat (limited to 'src/target.cpp')
0 files changed, 0 insertions, 0 deletions