[Nagiosplug-devel] Flight 1.4.8, ready for boarding
sean finney
seanius at seanius.net
Tue Apr 3 08:25:48 CEST 2007
hey,
On Mon, 2007-04-02 at 20:04 -0400, Thomas Guyot-Sionnest wrote:
> There might be another way. According to the article below to disconnect
> a UDP socket you have to call connect with the family member of the
> socket address structure to AF_UNSPEC. If you don't beat me it time I'll
> try to code that and see what happens.
>
> http://kerneltrap.org/node/7491
from a speed standpoint, i think the 2-socketed approach is a little
better because you can pre-allocate them, and no further action is
needed at runtime. so, faster at the expense of a some extra fd's.
> If someone can tell me what should I use for the 3rd arg of connect()
> that'll help, otherwise it won't take me long to figure it out :)
sizeof(struct sockaddr_in) i believe. i guess this value would be
different for ipv6 though. currently in the code we use getaddrinfo's
results for the first batch of sockets. the nice thing about that is
iirc the info passed back is compatible with ipv6 as well (the length is
a field in the results), so i guess that'd be another argument for the 2
sockets approach.
sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070403/b20bbacc/attachment.sig>
More information about the Devel
mailing list