home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vxworks:1170 comp.unix.bsd:10975 comp.protocols.tcp-ip:5829
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!olivea!sgigate!sgi!iphasew!hwajin
- From: hwajin@iphasew.com (Hwa-Jin Bae)
- Newsgroups: comp.os.vxworks,comp.unix.bsd,comp.protocols.tcp-ip
- Subject: Re: Help! (75 seconds to connect() after reboot)
- Message-ID: <C0GHvI.3qI@iphasew.com>
- Date: 6 Jan 93 23:44:22 GMT
- References: <1993Jan6.191411.4535@seas.smu.edu>
- Distribution: usa
- Organization: Interphase West, Santa Clara, CA
- Lines: 18
-
- In article <1993Jan6.191411.4535@seas.smu.edu> burch@seas.smu.edu (Chris Burchett) writes:
- >Unfortunately, in my application 75 seconds is somewhat too long
- >to wait.
-
- in vxworks 5.0+, there is an undocumented call -- connectWithTimeout() which
- takes the same args as connect() plus extra last arg of type 'struct timeval *'
- which you may be able to use -- you can specify the delay of your own.
-
- or you could also just try non-blocking connect() -- set socket FIONBIO
- temporarily, call connect(), which should return EINPROGRESS immediately
- if connect attempt is to block -- when this happens you should select()
- for 'write'. the socket will be marked writeable once's it's connected.
- to verify the connection after select() returns with 'write' selected, you
- can do a getpeername(). this is actually what connectWithTimeout() does.
- [ i do hope this is still in vxworks, it was a few years back when i put this
- into the system ]
-
- hwajin
-