Cocoa network stack. Blocks. Simple.
Having written nearly a dozen network stacks, they all end up starting with some code similar to what you see here. While this code can be used as is, You will probably get more out of with your own customizations or a wrapper class of some kind.