Skip to content

Conversation

@Sunderlandkyl
Copy link
Contributor

Before closing a socket, the application should call shutdown to ensure that all data is sent and received on the closed socket. If closesocket is called without calling shutdown, any data that has not been sent may be lost.

https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-closesocket

@Sunderlandkyl
Copy link
Contributor Author

@leochan2009 This change has no effect on Linux/macOS, so the failing GitHub action seems to be unrelated.

Before closing a socket, the application should call shutdown to ensure that all data is sent and received on the closed socket.
If closesocket is called without calling shutdown, any data that has not been sent may be lost.

https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-closesocket
@Sunderlandkyl Sunderlandkyl force-pushed the shutdown_socket_win branch from cc001ec to 5b35488 Compare May 5, 2025 19:49
@leochan2009
Copy link
Contributor

indeed. the change is only windows related. there must be some issue with Github Action.

@Sunderlandkyl
Copy link
Contributor Author

Any comments, or can it be integrated as-is?

@leochan2009
Copy link
Contributor

let me test the commit with the appveyor for windows environment. will update you shortly

@leochan2009
Copy link
Contributor

image

@leochan2009 leochan2009 merged commit 2629393 into openigtlink:master May 6, 2025
0 of 3 checks passed
@Sunderlandkyl Sunderlandkyl deleted the shutdown_socket_win branch May 6, 2025 16:37
@Sunderlandkyl
Copy link
Contributor Author

Thanks @leochan2009!

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

Successfully merging this pull request may close these issues.

2 participants