How does this fail? Error message? I noticed the comment about overriding the Nagle algorithm. To override set socket option TCP_NODELAY (beware that this is a bad idea if you are already getting lots of collisions, since it increases the number of packets).