Subject: |
Re: [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 |
From: |
Dirk Zimoch via Core-talk <[email protected]> |
To: |
[email protected] |
Date: |
Mon, 16 Sep 2019 08:50:58 -0000 |
The send() trick with 0 bytes does not work on all systems. It seems to depend on the Linux kernel version as well.
I am testing now a different solution. On Linux the call ioctl(sock, TIOCOUTQ, &unsent) gives the number of unsent bytes in the TCP output queue. This allows to keep the unsent bytes in the buffer in case it turns out later that the connection is broken.
On macOS there seems to be a similar functionality with getsockopt(sock, SOL_SOCKET, SO_NWRITE, &unsent), but I cannot test because I have no mac.
Other Unix flavors may or may not have such a feature.
For vxWorks I could not find a way to get the number of unsent bytes, neither for version 5.5 nor for 6.7.
I don't know about RTEMS.
On Windows 10 the number of unsent bytes should be available with WSAIoctl(sock, SIO_TCP_INFO, ..._). I spent most of last week to find out why it is not working before finding out that the Win 10 version I got was too old. I am upgrading now. Older Windows versions seem to have no way to find out the number of unsent bytes.
So I can mitigate the problem of message loss for some clients but not for all. Depending on the OS.
--
https://code.launchpad.net/~dirk.zimoch/epics-base/+git/epics-base/+merge/372043
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.
- References:
- [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 Dirk Zimoch via Core-talk
- Navigate by Date:
- Prev:
Jenkins build is back to normal : EPICS-3.14 #428 Jenkins EPICS PSI via Core-talk
- Next:
Re: Epics configure Makefile generation Heinz Junkes via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 Dirk Zimoch via Core-talk
- Next:
Re: [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 mdavidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|