Change in libosmocore[master]: socket: add function to wait until a socket becomes writeable

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Jun 1 20:58:51 UTC 2021


Hello Jenkins Builder, laforge, fixeria, pespin, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/libosmocore/+/24435

to look at the new patch set (#2).

Change subject: socket: add function to wait until a socket becomes writeable
......................................................................

socket: add function to wait until a socket becomes writeable

In cases where a socket is created using the option OSMO_SOCK_F_NONBLOCK
it is not possible to detect a connection error because
osmo_sock_init() will return early while the connection is still in
progress.

One way to make sure that the socket is connected is to use select to
wait until the socket becomes writeable and to use getsockopt to check
SO_ERROR.

The function osmo_sock_wait() waits until the socket becomes writeable.
>From the error code the API user can determine whether the connection
was successful or not.

Change-Id: I1c68185120fa2a6c9b6cb8aa2a25232a44ff5508
Related: SYS#4971
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 53 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/24435/2
-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24435
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1c68185120fa2a6c9b6cb8aa2a25232a44ff5508
Gerrit-Change-Number: 24435
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/0a8a485a/attachment.htm>


More information about the gerrit-log mailing list