HP3000-L Archives

July 1996, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Bennett CSY <[log in to unmask]>
Reply To:
Bill Bennett CSY <[log in to unmask]>
Date:
Tue, 2 Jul 1996 18:26:27 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
On Mon, 01 Jul 1996 16:46:46 -0700, Gavin Scott ([log in to unmask]) wrote:
: I have a program I'm trying to get to work under Posix that uses BSD
: sockets to send a UDP packet to a server and then wait for a response.
 
: Like most unix programs it uses alarm() as a timeout function to wake
: itself up if no response is received (sockets has no timeout feature
: for recvfrom() apparently).  My problem is that the current signals
: implementation in MPE/iX (at least on 5.0) will not deliver the alarm
: signal while the process is waiting in system code (the recvfrom), thus
: rendering the alarm utterly useless.
 
: Anyone know of any workarounds for this?  Currently I'm thinking of:
 
Gavin,
 
I think the Select function (aka the HPSELECT Intrinsic) will do the
trick.  So rather than wait on the recvfrom() you wait on the select
which has a timeout. I've never used it with UDP, but if you have a
valid socket file discriptor, it should work (there are files that
select doesn't work, for example terminal files).
 
Good Luck,
 
Bill
--
---------------------------------------------------------------------------
Bill Bennett                                            [log in to unmask]
Speaking for myself and not my company
---------------------------------------------------------------------------

ATOM RSS1 RSS2