-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add a Transport::TCP class for tcp-based communication. #2689
Merged
andy31415
merged 46 commits into
project-chip:master
from
andy31415:01_implement_tcp_transport
Sep 17, 2020
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
a3ece7d
Add Disconnect call support in transport base and tuple, since connec…
andy31415 5a64e0f
Remove message send port from UDP - peer address already contains a port
andy31415 80c881b
Add tcp transport type to peer addresses
andy31415 aace8a8
Create a TCP header and cpp files that compile with gn. Not yet funct…
andy31415 1d6c6b9
Added TCP tests. They fail since no implementation available, however…
andy31415 57cdb9c
Started to rename more stuff from UDP to TCP in tests
andy31415 5c98783
Add a buffer of active connections within tcp connection. Use templat…
andy31415 4fefbb2
Added an array of "Pending packets" for the TCP interface
andy31415 a6c8f9e
Free pending packet buffers in the TCP destructor
andy31415 a46519e
Start adding ability to enqueu and start connections over TCP
andy31415 bc911d6
More work on connections
andy31415 443add7
Setup for data receive
andy31415 8e7f6ac
Setup for data receive
andy31415 be7ad2c
Seeing TCP data being received
andy31415 1a1425f
Prepare for message receiving. CHIPConnection logic can be used as a …
andy31415 ef4a42c
Added logic for message receiving and parsing
andy31415 10fc27e
Unit tests now pass, however connections are not properly closed yet
andy31415 3d7a4c7
Unit tests pass
andy31415 517235a
Add ability to close active connections and wait for them to actually…
andy31415 ed3cb92
Work towards being able to close active connections
andy31415 6b66de4
Add close notification handling and peer close callback
andy31415 8b9d993
One end of the connection now is cleared. Not both ends though, which…
andy31415 be3d830
Update accept error handling: nothing we can do except log
andy31415 0e4819f
Slight comment update
andy31415 628359f
Update comment on what causes time wait in connections. Frustrating, …
andy31415 14cdba1
Merge branch 'master' into 01_implement_tcp_transport
andy31415 53d8fd9
Use interface from the peer address rather than from the listen socket
andy31415 6278737
Add interface comparison logic into peer address objects
andy31415 9958256
Update typo for interface id
andy31415 e3662fb
GN format files
andy31415 975c34b
Update timeouts to 5s for TCP tests, hoping qemu tests fail because o…
andy31415 acabcc3
Update namespacing in unit tests
andy31415 7c019c7
Add TCP endpoint include - seems missing as nrf complains
andy31415 6086423
Add check for TCP endpoint to exist within the TCP transport. This if…
andy31415 65b37fd
Code review updates
andy31415 c67cb08
Fix typo
andy31415 8083d21
More code review updates: add a free on error and update file descrip…
andy31415 287b5cd
More code review updates: ensure endpoint count is updated, add log f…
andy31415 a8637f0
Update one more place for used endpoint count decreasing
andy31415 1b60cbc
Call disconnect on session expiry
andy31415 3b27f33
Updated comment regarding expiry. Expiry is especially critical for T…
andy31415 7f5dfa4
Fix typo
andy31415 ab3202a
Code review updates
andy31415 9d9e445
More comment updates
andy31415 73e12e8
More comment updates
andy31415 da64988
Make peer address equality strict on interface id
andy31415 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we maintain this comment or is TCP the last constant we plan to add?
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.
I am not aware of anything else we could add as chip spec. I believe a comment would be 'add more stuff here if needed' however that seems redundant as any enum would be 'add more if needed'.