Skip to content

Add TCP client and ability to choose between TCP client and Server #292

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

Merged
merged 11 commits into from
Apr 26, 2016

Conversation

soundanalogous
Copy link
Member

Adds ability to setup board as a TCP client or TCP server.

jnsbyr and others added 11 commits April 15, 2016 20:50
- server related functions moved from WiFiStream into WiFiServerStream
- unified class interface for sketch file (no client/server defines)
- WiFi and TCP configuration and connect split into individual methods
(constructor, config, begin, maintain)
- WiFi only initialized once at startup
- fixed client accept in WiFiServerStream
- added host connection callback hook to notfiy connect and disconnect
- fixed missing update of _connected when accepting a client
- split wifi init and firmata init into separate functions
- add hostConnectionCallback
- check member _connected first in connect_client() to prevent querying
connected() of disconnected _client
- added method status() to check TCP connection state (ESP8266 only)
connection state management modified
- use generic names for init functions
- add clarifications to comments
@soundanalogous
Copy link
Member Author

soundanalogous commented Apr 24, 2016

@jnsbyr I think this is in a good state to merge into master. Let me know if you agree and/or if you had anything else to add or any concerns.

Next step IMO is to finalize the protocol definitions for state management (connect/reconnect and watchdog) and pin value reporting.

@jnsbyr
Copy link
Contributor

jnsbyr commented Apr 25, 2016

Had a look at the diffs and they look pretty good to me. You already tested several possible configurations so there is nothing I could add at this point.

It's agreed that we should continue with the protocol definitions. Maybe it is a good idea to create a watchdog test case both for a TCP and serial host link before finalizing the specifications.

@soundanalogous
Copy link
Member Author

I hadn't thought of the watchdog being necessary for serial since it's less likely in my experience at least to lose the connection, but I guess it could be useful for long running processes where power could be lost for some period of time causing a lose in the serial connection.

@soundanalogous soundanalogous merged commit fbd7667 into master Apr 26, 2016
@soundanalogous soundanalogous deleted the wifi-client branch April 26, 2016 04:39
@soundanalogous soundanalogous mentioned this pull request Apr 26, 2016
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.

2 participants