I am not sure you can do this at the application layer - you need kernel support to drop packets.
You can however trivially create a TCP proxy that slows traffic simulating dropped packets / congested networks. You might be able to do a proxy in Go using raw packets, but a lot of work. Maybe the bpf package - but probably easier just to use iptables. > On Dec 11, 2018, at 6:05 PM, Dan Kortschak <d...@kortschak.io> wrote: > > Is anyone aware of testing infrastructure for simulating flakey > networks without recourse to iptables on linux, i.e. a Go package/type > that can be used to to this? > > thanks > Dan > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.