sock_tcp: Add missing function and doc#5923
Conversation
9456d5a to
94b3031
Compare
|
Rebased to master and adapted for #5929 (also added timeout to |
94b3031 to
fc67664
Compare
| * @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. |
There was a problem hiding this comment.
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?
sys/include/net/sock/tcp.h
Outdated
| * puts("Error creating listening queue"); | ||
| * return 1; | ||
| * } | ||
| * puts("Accepting on port 12345"); |
There was a problem hiding this comment.
well in l. 49 below it starts accepting...
sys/include/net/sock/tcp.h
Outdated
| * } | ||
| * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| * | ||
| * In the case of we somehow manage to break the indefinite accepting loop we |
There was a problem hiding this comment.
UDP and IP doc say indefinite in a similar case.
There was a problem hiding this comment.
Ah sorry, thought it was a different line ^^"
aabadie
left a comment
There was a problem hiding this comment.
The simple TCP echo example is nice. I just have 2 minor comments.
|
Addressed comments. |
aecf754 to
6e2f1c5
Compare
|
Squashed |
|
And Go ! |
Provides detailed examples for
sock_tcpand 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.