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

Supporting dependency injection. Re-request #73

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JG-Adams
Copy link
Contributor

I needed to re-request #71 because codespace wasn't working for me.

The change I made is an attempt to address the API-compatibility concern. I assumed it had to do with how adding an extra parameter to existing function (enet_host_create) would cause inconsistence requirement. So I addressed this by moving it over to enet_host_create_ext() and reuse the code with enet_host_create calling it set to NULL. Making it behave exactly as one would expect.

Hope this is a proper solution! :)

I needed to re-request zpl-c#71 because codespace wasn't working for me.

The change I made is an attempt to address the API-compatibility concern. I assumed it had to do with how adding an extra parameter to existing function (enet_host_create) would cause inconsistence requirement. So I addressed this by moving it over to enet_host_create_ext() and reuse the code with enet_host_create calling it set to NULL. Making it behave exactly as one would expect.

Hope this is a proper solution! :)
enet_host_create_ext(address, peerCount, channelLimit, incomingBandwidth, outgoingBandwidth, NULL);
} /* enet_host_create */

ENetHost * enet_host_create_ext(const ENetAddress *address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth, ENetSocket* externalUDPSocket) {

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 108 lines.
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.

1 participant