In IocpProactor I saw that the callbacks to the functions recv, recv_into, recvfrom, sendto, send and sendfile all give the same callback function for when the overlapped operation is done.
I just wanted cleaner code so I made a static function inside the class that I give to each of these functions as the overlapped callbacks.
jimjjewett commented on Jul 11, 2020
jimjjewettmannequin
Mannequin
More actions
Looks good to me.
I at first worried that the different function names were useful metadata that was getting lost -- but the names were already duplicated in several cases. *If* that is still a concern for the committer, then instead of repeating the code (as current production does), each section should just say newname=origname before registering the static method (as the patch does), and should bind a distinct name for each usage.
Activity
tontinton commented on Jul 8, 2020
In IocpProactor I saw that the callbacks to the functions recv, recv_into, recvfrom, sendto, send and sendfile all give the same callback function for when the overlapped operation is done.
I just wanted cleaner code so I made a static function inside the class that I give to each of these functions as the overlapped callbacks.
jimjjewett commented on Jul 11, 2020
Looks good to me.
I at first worried that the different function names were useful metadata that was getting lost -- but the names were already duplicated in several cases. *If* that is still a concern for the committer, then instead of repeating the code (as current production does), each section should just say newname=origname before registering the static method (as the patch does), and should bind a distinct name for each usage.
tontinton commented on Jul 11, 2020
I feel like the metadata is not really a concern here. I like when there is no code duplication :)
tontinton commented on Aug 29, 2020
bump