🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #1070

Sending AF_INET UDP DataGrams to multiple destinations

#1070
From: Mark Lawrence
Date: Fri, 19 Oct 1990 16:48
13 lines
1027 bytes
I've written a function which sends an opaque data packet via
AF_INET/UDP using the sendto() function to potentially different
destinations, i.e., port number will vary from invocation to
invocation.

Currently, I check on every invocation to see if the port number to send
to is different and if so, close the socket and re-open (using the
socket() function).  Is this really necessary?  I set it up like this
because I was afraid that the lowerlevel code would get confused if I
used the same socket descriptor but different port numbers in the sendto()
call.
-- 
mark@DRD.Com uunet!apctrc!drd!mark$B!J%^!<%/!!!&%m!<%l%s%9!K(B
Technical Details
Message-ID: <1990Oct19.164840.7754@DRD.Com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!apctrc!drd!mark

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!apctrc!drd!mark
From: mark@DRD.Com (Mark Lawrence)
Newsgroups: comp.unix.programmer,comp.unix.questions
Subject: Sending AF_INET UDP DataGrams to multiple destinations
Message-ID: <1990Oct19.164840.7754@DRD.Com>
Date: 19 Oct 90 16:48:40 GMT
Reply-To: mark@drd.Com (Mark Lawrence)
Distribution: na
Organization: DRD Corporation, Tulsa, OK
Lines: 13