Skip to content

sock_tcp: Add missing function and doc#5923

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
miri64:sock/api/add-missing-func+doc
Oct 17, 2016
Merged

sock_tcp: Add missing function and doc#5923
aabadie merged 1 commit intoRIOT-OS:masterfrom
miri64:sock/api/add-missing-func+doc

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Oct 11, 2016

Provides detailed examples for sock_tcp and fixes for the documentation. Also, there wasn't any function to get the local end point of a listening queue yet, but this adds it.

@miri64 miri64 added Area: network Area: Networking Area: doc Area: Documentation Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. labels Oct 11, 2016
@miri64 miri64 force-pushed the sock/api/add-missing-func+doc branch 2 times, most recently from 9456d5a to 94b3031 Compare October 11, 2016 15:19
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 12, 2016

Rebased to master and adapted for #5929 (also added timeout to accept)

@miri64 miri64 force-pushed the sock/api/add-missing-func+doc branch from 94b3031 to fc67664 Compare October 12, 2016 15:54
* @note Function may block.
*
* @return The number of bytes read on success.
* @return 0, if no read data is available, but everything is in order.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone remember why we introduced that? Since a sock can properly only be initialized via sock_tcp_connect() and sock_tcp_listen() they only can't have a local end point, if they are not connected (i.e. not initialized), so this result would be the same case as -ENOTCONN. @kaspar030 @brummer-simon?

* puts("Error creating listening queue");
* return 1;
* }
* puts("Accepting on port 12345");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"listening" ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well in l. 49 below it starts accepting...

* }
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* In the case of we somehow manage to break the indefinite accepting loop we
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

infinite

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UDP and IP doc say indefinite in a similar case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, thought it was a different line ^^"

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simple TCP echo example is nice. I just have 2 minor comments.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 17, 2016

Addressed comments.

@miri64 miri64 force-pushed the sock/api/add-missing-func+doc branch from aecf754 to 6e2f1c5 Compare October 17, 2016 12:47
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 17, 2016

Squashed

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 17, 2016
@miri64 miri64 added this to the Release 2016.10 milestone Oct 17, 2016
@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Oct 17, 2016

And Go !

@aabadie aabadie merged commit 3b30d51 into RIOT-OS:master Oct 17, 2016
@miri64 miri64 deleted the sock/api/add-missing-func+doc branch October 17, 2016 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants