src: improve code comments
This commit is contained in:
parent
07af653b17
commit
f8a135487d
@ -146,7 +146,7 @@ int sock_set_event(port_state_t* port_state,
|
|||||||
const struct epoll_event* ev) {
|
const struct epoll_event* ev) {
|
||||||
/* EPOLLERR and EPOLLHUP are always reported, even when not requested by the
|
/* EPOLLERR and EPOLLHUP are always reported, even when not requested by the
|
||||||
* caller. However they are disabled after a event has been reported for a
|
* caller. However they are disabled after a event has been reported for a
|
||||||
* socket for which the EPOLLONESHOT flag as set. */
|
* socket for which the EPOLLONESHOT flag was set. */
|
||||||
uint32_t events = ev->events | EPOLLERR | EPOLLHUP;
|
uint32_t events = ev->events | EPOLLERR | EPOLLHUP;
|
||||||
|
|
||||||
sock_state->user_events = events;
|
sock_state->user_events = events;
|
||||||
|
|||||||
8
src/ws.c
8
src/ws.c
@ -60,10 +60,10 @@ SOCKET ws_get_base_socket(SOCKET socket) {
|
|||||||
* never intercept the `SIO_BASE_HANDLE` ioctl [1], Komodia based LSPs do
|
* never intercept the `SIO_BASE_HANDLE` ioctl [1], Komodia based LSPs do
|
||||||
* so anyway, breaking it, with the apparent intention of preventing LSP
|
* so anyway, breaking it, with the apparent intention of preventing LSP
|
||||||
* bypass [2]. Fortunately they don't handle `SIO_BSP_HANDLE_POLL`, which
|
* bypass [2]. Fortunately they don't handle `SIO_BSP_HANDLE_POLL`, which
|
||||||
* we can use to obtain the socket associated with the next protocol chain
|
* will at least let us obtain the socket associated with the next winsock
|
||||||
* entry. If this succeeds, loop around and call `SIO_BASE_HANDLE` again
|
* protocol chain entry. If this succeeds, loop around and call
|
||||||
* with the retrieved BSP socket to be sure that we actually got all the
|
* `SIO_BASE_HANDLE` again with the returned BSP socket, to make sure that
|
||||||
* way to the base.
|
* we unwrap all layers and retrieve the actual base socket.
|
||||||
* [1] https://docs.microsoft.com/en-us/windows/win32/winsock/winsock-ioctls
|
* [1] https://docs.microsoft.com/en-us/windows/win32/winsock/winsock-ioctls
|
||||||
* [2] https://www.komodia.com/newwiki/index.php?title=Komodia%27s_Redirector_bug_fixes#Version_2.2.2.6
|
* [2] https://www.komodia.com/newwiki/index.php?title=Komodia%27s_Redirector_bug_fixes#Version_2.2.2.6
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user