User Activity

  • Created ticket #32 on WinLIRC

    Issue handling multiple clients

  • Modified a comment on ticket #31 on WinLIRC

    Okay, perfect. That's great to know. I have one last scenario to run by you if you don't mind. Say an FD_READ occurs on a socket. This will cause WaitForMultipleObjects to unblock after automatically resetting the event object, and ThreadProc will start processing the event. Then an FD_CLOSE event occurs concurrently, re-signalling the event object. But let's say that while processing the FD_READ, the recv call returns SOCKET_ERROR, causing this logic to run: if(bytes==0 || bytes==SOCKET_ERROR) {...

  • Posted a comment on ticket #31 on WinLIRC

    Okay, perfect. That's that's great to know. I have one last scenario to run by you if you don't mind. Say an FD_READ occurs on a socket. This will cause WaitForMultipleObjects to unblock after automatically resetting the event object, and ThreadProc will start processing the event. Then an FD_CLOSE event occurs concurrently, re-signalling the event object. But let's say that while processing the FD_READ, the recv call returns SOCKET_ERROR, causing this logic to run: if(bytes==0 || bytes==SOCKET_ERROR)...

  • Posted a comment on ticket #31 on WinLIRC

    Ah, I didn't realize that. Thanks for pointing that out. Actually, looking at the documentation for WaitForMultipleObjects, something else concerns me about that function: "The function modifies the state of some types of synchronization objects. Modification occurs only for the object or objects whose signaled state caused the function to return." Does that mean if 2 sockets got FD_READ events at the exact same time that both of them will automatically get reset but the return value will only indicate...

  • Posted a comment on ticket #31 on WinLIRC

    Hmm, I believe the manual reset is still needed. Here's why: Take a look at Microsoft's documentation for WSAEventSelect: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsaeventselect#return-value It states: "Having successfully recorded the occurrence of the network event (by setting the corresponding bit in the internal network event record) and signaled the associated event object, no further actions are taken for that network event until the application makes the function...

  • Created ticket #31 on WinLIRC

    Race condition when writing to socket immediately after connecting

View All

Personal Data

Username:
wizardbrony
Joined:
2020-06-18 19:30:58

Projects

  • No projects to display.

Personal Tools

Monday.com Logo