<div dir="ltr">All,<div>Hope you are safe and well.</div><div><br><div>This is probably a stupid question and I probably need more coffe, but... if I use {packet, 4} as a transport option on a server that uses a binary protocol, it means that it might wait for up to 256^4 so 4,294,967,296 bytes of data. If I'm not mistaken, then this could be an easy target for DDoS attacks (client are not necessarily well-known).</div></div><div><br></div><div>Unfortunately this server needs to be able to receive data messages up to 250k of size in JSON format, so {packet, 2} is not an option.</div><div><br></div><div>Is my only option to set {packet, raw} and run a streamed json parser, or is there another way to limit the amount of data in some other way?</div><div><br></div><div>Thank you,</div><div>r.</div></div>