FreeRTOS / FreeRTOS-Plus-TCP

FreeRTOS-Plus-TCP library repository. +TCP files only. Submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
MIT License
152 stars 163 forks source link

[Feature Request] Standardize Function Naming Conventions #1069

Closed HTRamsey closed 9 months ago

HTRamsey commented 10 months ago

The function naming conventions should be more universal, such as with capitalization in the case of FreeRTOS_SignalSocket vs FreeRTOS_closesocket. I would suggest renaming as needed for next major version and include macros to link to the old names.

Also there are some functions such as xSocketSetSocketID/pvSocketGetSocketID which state are only used by the user but don't have the API naming convention.

aggarg commented 10 months ago

Thank you @HTRamsey for your suggestion. We will keep it in mind for next major release.

htibosch commented 10 months ago

@HTRamsey wrote:

The function naming conventions should be more universal, such as with capitalization in the case of FreeRTOS_SignalSocket vs FreeRTOS_closesocket.

The function FreeRTOS_SignalSocket is using Camel case because there is not a corresponding signalsocket(), although the function signal() is quite similar: it can interrupt an API.

All BSD functions are in small letters and preceded by FreeRTOS_, such as FreeRTOS_bind().