I notice that connectWithTimeout *is* supplied in an RTEMS specific area of
base, but that this functionality isn't implemented in base for other OS. CA
handles this issue by letting connect() block in an independent thread while
detecting timeouts in another independent timer queue thread. The timer
queue thread interrupts the thread in the connect() call asynchronously when
a timeout is detected. The complication with this approach is related to
implementing the blocking socket call interrupt functionality uniformly
across the different OS. We *do* have an OSI interface for this in base
which isn't beauteous, but is functional on all OS so far encountered. Also,
with this design the connect() function is running in an independent thread
so timeout intervals are not critical. I notice that the RTEMS
implementation uses SO_RCVTIMEO. My experience has been that SO_RCVTIMEO is
fairly new and not uniformly implemented by the various socket libraries.
One could also use non-blocking IO and the select() function to implement
connectWithTimeout(). Starting with EPICS R3.14, my personal choice has been
to move away from non-blocking IO and select() based scheduling in favor of
thread scheduled implementations.
Jeff
> -----Original Message-----
> From: Peng, Sheng [mailto:[email protected]]
> Sent: Friday, October 29, 2004 4:06 PM
> To: [email protected]
> Subject: OSI connectWithTimeout
>
>
> Hi!
> Do we have an official OSI version of connectWithTimeout or I have to
> stay with my own?
> Thanks.
> Sheng
- References:
- OSI connectWithTimeout Peng, Sheng
- Navigate by Date:
- Prev:
OSI connectWithTimeout Peng, Sheng
- Next:
MVME 5500/6100: How to flash the VxWorks bootrom? Ralph Lange
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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:
OSI connectWithTimeout Peng, Sheng
- Next:
MVME 5500/6100: How to flash the VxWorks bootrom? Ralph Lange
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
<2004>
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|