Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Go

Name: Anonymous 2012-06-23 6:16

Currently running this bitch on a server with 24 processors clocked at 2.6Ghz, 16GB of ram and fiber connection. Currently pinging about 300-400 IP addresses/second. And the glue holding this bitch together is Go. Look at that simple concurrency model and message passing, it's a thing of fucking beauty. Now to get this running on the other 4 servers just like it.

http://pastebin.com/rqEvpszX
Currently running at: 177 valid IPs/second, 582 IPs/second

And I know that the last part is a little hacky and that the IP functions should be moved to their own source file. Bite me.

Why aren't you using Go /prog/?

Name: Anonymous 2012-06-23 12:02

//Ugly as fuck. Needs to be cleaned
I'm constantly perplexed by what /prog/ believes is ugly/sloppy code.  That looks like an entirely straightforward implementation of what it is meant to do, excepting that it ignores what happens when i.a > 255.

You could probably revector the whole thing into a function that adds one to one property, checks whether it is still in range, and, if it is not, zeros it and calls itself to add one to the next property.  I don't see why you'd need to in such a simple program, though.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List