Skip to content
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

Incorrect Socket Flag for Non-Blocking Sockets #22

Open
osborners opened this issue Apr 28, 2022 · 0 comments
Open

Incorrect Socket Flag for Non-Blocking Sockets #22

osborners opened this issue Apr 28, 2022 · 0 comments

Comments

@osborners
Copy link

osborners commented Apr 28, 2022

SOCK_IO_NONBLOCK is not a socket flag option for socket(), as used here in loopback.c:

tmp = socket(sn, Sn_MR_TCP4, port, SOCK_IO_NONBLOCK);

It should be SF_IO_NONBLOCK.

However, the change introduced here means that only SOCK_IO_NONBLOCK will set the socket mode to non-blocking: c9c9ef8#diff-5779d7831ac938e3f7d8cb0c0890060576acc6536afff3c010e7838367c7d9b3R172

21/05/24: A side effect of using SOCK_IO_NONBLOCK (=1) is that 'Force ARP' mode in Sn_MR2 gets enabled: https://github.com/Wiznet/io6Library/blob/master/Ethernet/socket.c#L163

@osborners osborners changed the title Misleading comment in socket.h. Incorrect Socket Flag for Non-Blocking Sockets Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant