We had a similar problem with a project at work once. I didn't do that part and am not that familiar with sockets, but I think it had something to do with the size of the data that is being sent must be a multiple of some pre-set OS packet size or something like that so we had to pad the buffer if it was less than that size.
I know that sounds a little vague, but I hope it can put you on the right track.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.