zephyr icon indicating copy to clipboard operation
zephyr copied to clipboard

net: lib: call socket poll if could not send data completely in http or ws (websocket)

Open AndreyDodonov-EH opened this issue 2 years ago • 5 comments

In http_client, if we couldn't send all (or any data) via the socket, invoke poll instead of blindly retrying and flooding the socket.

It's especially relevant after adding https://github.com/zephyrproject-rtos/zephyr/pull/45626

AndreyDodonov-EH avatar May 13 '22 15:05 AndreyDodonov-EH

Should we also extend websockets and mqtt (did I miss some others?) with poll?

AndreyDodonov-EH avatar May 13 '22 16:05 AndreyDodonov-EH

Should we also extend websockets and mqtt (did I miss some others?) with poll?

MQTT lib handles socket on its own and by design works with blocking socket. As for websocket lib though, it seems to take a socket from the app, so it should also be ready to work with non-blocking.

rlubos avatar May 16 '22 09:05 rlubos

@rlubos Should I push same websocket adjustment in the same PR or create a new one?

AndreyDodonov-EH avatar May 17 '22 15:05 AndreyDodonov-EH

@rlubos Should I push same websocket adjustment in the same PR or create a new one?

It doesn't make a difference for me as long as the commits are separate.

rlubos avatar May 18 '22 08:05 rlubos

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

github-actions[bot] avatar Aug 10 '22 00:08 github-actions[bot]

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

github-actions[bot] avatar Oct 30 '22 00:10 github-actions[bot]