-
Notifications
You must be signed in to change notification settings - Fork 1
Wifi UDP class and Begin function #106
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far.
I think adapting the socket class to extend for UDP sockets should make the implementation of this class quicker and easier.
And a lot is already implemented on the socket class reusable by the UDP socket, interrupts, buffers, etc.
_last_error(CY_RSLT_SUCCESS) { | ||
} | ||
|
||
uint8_t WiFiUDP::begin(uint16_t port) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Socket class is already there. Shouldn´t we extend it for UPD?
When UDP we use recvFrom() and sendTo() instead of recv() and send(). The create() gets different arguments but many other things would be reusable.
And other functions are simply not used for UDP.
https://github.com/Infineon/mtb-example-wifi-udp-client/blob/master/source/udp_client.c
https://github.com/Infineon/mtb-example-threadx-wifi-udp-server/blob/master/udp_server.c
Signed-off-by: IFX-Anusha <[email protected]>
Signed-off-by: IFX-Anusha <[email protected]>
Signed-off-by: IFX-Anusha <[email protected]>
Signed-off-by: IFX-Anusha <[email protected]>
Signed-off-by: jaenrig-ifx <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :) 👍
This PR contains the
Note :- Test case structure can be later modified according to the requirements
I have created a branch for the UDP class and will be opening the PR to this branch for the UDP class functions