-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows sockets 2 #5
base: master
Are you sure you want to change the base?
Windows sockets 2 #5
Conversation
2224e03
to
4a8c716
Compare
https://docs.microsoft.com/windows/win32/api/winsock2/nf-winsock2-accept SOCKET WSAAPI accept(
[in] SOCKET s,
[out] sockaddr *addr,
[in, out] int *addrlen
); https://docs.microsoft.com/windows/win32/api/winsock/nf-winsock-bind int bind(
[in] SOCKET s,
const sockaddr *addr,
[in] int namelen
); https://docs.microsoft.com/windows/win32/api/winsock2/nf-winsock2-connect int WSAAPI connect(
[in] SOCKET s,
[in] const sockaddr *name,
[in] int namelen
); https://docs.microsoft.com/windows/win32/api/winsock/nf-winsock-getsockname int getsockname(
[in] SOCKET s,
[out] sockaddr *name,
[in, out] int *namelen
); https://docs.microsoft.com/windows/win32/api/winsock/nf-winsock-setsockopt int setsockopt(
[in] SOCKET s,
[in] int level,
[in] int optname,
[in] const char *optval,
[in] int optlen
); https://docs.microsoft.com/windows/win32/api/winsock2/nf-winsock2-wsasocketa SOCKET WSAAPI WSASocketA(
[in] int af,
[in] int type,
[in] int protocol,
[in] LPWSAPROTOCOL_INFOA lpProtocolInfo,
[in] GROUP g,
[in] DWORD dwFlags
);
SOCKET WSAAPI WSASocketW(
[in] int af,
[in] int type,
[in] int protocol,
[in] LPWSAPROTOCOL_INFOW lpProtocolInfo,
[in] GROUP g,
[in] DWORD dwFlags
); |
9fae0da
to
2695757
Compare
Merged into fork selectable-socketpair/selectable-socketpair: |
2695757
to
501023d
Compare
* socket() https://docs.microsoft.com/windows/win32/api/winsock2/nf-winsock2-socket#return-value [...] a value of INVALID_SOCKET is returned [...] * setsockopt() https://docs.microsoft.com/windows/win32/api/winsock2/nf-winsock2-setsockopt#return-value [...] a value of SOCKET_ERROR is returned [...] * WSASocket() https://docs.microsoft.com//windows/win32/api/winsock2/nf-winsock2-wsasocketw#return-value [...] a value of INVALID_SOCKET is returned [...] * accept() https://docs.microsoft.com/windows/win32/api/winsock2/nf-winsock2-accept#return-value [...] a value of INVALID_SOCKET is returned [...]
The actual optval argument type is DWORD (boolean) for the SOL_SOCKET socket option SO_REUSEADDR: https://docs.microsoft.com/windows/win32/winsock/sol-socket-socket-options The type of the optlen argument of setsockopt() is "int": https://docs.microsoft.com/windows/win32/api/winsock/nf-winsock-setsockopt#syntax The type of the namelen argument of getsockname() is "int *": https://docs.microsoft.com/windows/win32/api/winsock/nf-winsock-getsockname#syntax After these changes, socklen_t is not used anymore. Therefore we can revert from <w2stcpip.h> to <winsock2.h>.
501023d
to
a4d0b8a
Compare
Make sure the code conforms to the Windows Socket 2 documentation.