Ben Noordhuis
9e32c2ef3e
dgram: fix double implicit bind error
Calling send() on an unbound socket forces an implicit bind to
a random port.
332fea5
made the 'listening' event asynchronous. Unfortunately,
it also introduced a bug where the implicit bind was tried more
than once if send() was called again before the first bind operation
completed.
Address that by keeping track of the bind status and making sure that
bind() is called only once.
Fixes #4499 .
12 years ago
Ben Noordhuis
61978f57e6
dgram: remove stale code
12 years ago
Ben Noordhuis
332fea5ac1
dgram: make .bind() always asynchronous
13 years ago
Timothy J Fontaine
2637b5c261
ref/unref for net.Socket net.Server dgram.Socket
13 years ago
Ben Noordhuis
d2eaabd0df
dgram: hook up handle wrap to owning object
13 years ago
Ben Noordhuis
1ab95a536a
udp_wrap: use new slab allocator
13 years ago
ssuda
b72d43cbf9
dgram: fix when we call .close() inside 'listening'
13 years ago
Ben Noordhuis
3502e45b6c
dgram: defer send error to next tick
13 years ago
Ben Noordhuis
defa637378
dgram: fix out-of-bound memory read
13 years ago
Seth Fitzsimmons
1ce14eca44
dgram: handle close of dgram socket before DNS lookup completes
13 years ago
Ben Noordhuis
2775c0e97e
dgram: bring back setTTL()
13 years ago
Ben Noordhuis
46e86aa803
dgram: bring back setMulticastLoopback()
13 years ago
Ben Noordhuis
6999fb3d1e
dgram: make addMembership() and dropMembership() conform to v0.4 API
- throw on error, don't return an error code
13 years ago
Ben Noordhuis
fc6a9673c8
dgram: make setBroadcast() conform to v0.4 API
- don't return a value
13 years ago
Ben Noordhuis
ed111975a0
dgram: make setMulticastTTL() conform to v0.4 API
- throw if the ttl argument is not a number
- return the ttl argument (not particulary useful but it's what v0.4 did)
Note that the 0 < ttl < 256 check has *not* been reinstated. On Linux, -1 is a
valid argument to setsockopt(IPPROTO_IP, IP_TTL).
13 years ago
Dan VerWeire
f2b1f57f74
dgram: reintroduce setMulticastTTL()
Removed during the early stages of node 0.5 refactoring to libuv.
13 years ago
Dan VerWeire
f749338e1e
dgram: reintroduce setBroadcast()
Removed during the early stages of node 0.5 refactoring to libuv.
13 years ago
Roman Shtylman
a38fd6056c
dgram: reintroduce addMembership() and dropMembership()
Removed during the early stages of node 0.5 refactoring to libuv.
13 years ago
Bert Belder
83152d174c
Dgram: correctly report recvmsg errors
13 years ago
Ryan Dahl
71cce3f45b
Remove dgram_legacy
13 years ago
Bert Belder
b5d58f11cb
dgram-uv: black hole incoming messages after closing
Fixes test/simple/test-dgram-pingpong.js on windows
14 years ago
Ben Noordhuis
bba432f00e
dgram: add socket.fd compatibility hack to dgram_uv.js
14 years ago
Ben Noordhuis
cbd4033619
dgram: integrate libuv UDP support
14 years ago