Closed aeden closed 11 years ago
Good idea. I try to follow the 50/70 format for commit messages and use erlang-mode for formatting so I've edited the patch a little (see d92491ed58).
Totally unrelated but as a part of adding a UDP listener to dns_erlang, I've been toying with Linux 3.9's SO_REUSEPORT
to bind multiple sockets to the same port as well as a patch to prim_inet that adds {active,read_packets}
as an option between {active,true}
and {active,once}
. Like {active,true}
, up to element(2,{read_packets,N})
packets are read when the socket becomes readable, then like {active,once}
the socket is set back to passive mode. I've not had the spare cycles to see how worthwhile they are (if it all) but if you're interested drop me an email and I'll send you some notes.
This makes the decode_message more resilient to bogus data.