-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
SocketWrapper - copyable networking clients #768
Conversation
94ade54
to
0ed8ea7
Compare
Great work, I'm back up and running with my telnet server. I did get a crash when doing a client available() or read() (not sure which) after having called a stop() on the client. Easy workaround in my code and probably shouldn't have been doing that anyway. |
0ed8ea7
to
062c97c
Compare
062c97c
to
ad5b62c
Compare
@facchinm this is important. the networking libraries in this core will not work correctly without this. the copy ability of instanced objects is a feature of the Arduino language. Imagine String would not be copyable in some Core. |
@JAndrassy I think you should rebase this on master since |
ad5b62c
to
9d7f255
Compare
@pennam thank you for the reminder. done |
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.
Thanks for the contribution @JAndrassy
Do you mind also changing setEccSlot
visibility? It must be public.
I'm running a bit of testing on this PR so we can hopefully merge it for the next release.
9d7f255
to
57cabb9
Compare
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.
👍 Thanks
copyable networking clients
it is done the same way as in other LwIP based Arduino networking libraries including the C33 LwipWrapper. There WiFiClient/EthernetClient is a simple copyable class redirecting every method to the object managing the socket. That object is stored in std:shared_ptr.
The PR uses the existing MbedClient as the managing class and adds the copyable class from which then WiFiClent and EthernetClient inherit.
I can't test WiFiSSLSE050Client