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

dexter gerrit-no-reply at lists.osmocom.org
Mon Jun 14 08:30:48 UTC 2021


Hello Jenkins Builder, laforge, pespin, fixeria, 

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

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

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

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(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/24435/4
-- 
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: 4
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/20210614/2d38e706/attachment.htm>


More information about the gerrit-log mailing list